home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1994-10-19 | 80.6 KB | [ONLN/HLX2] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Tue Oct 11 09:09:35 1994, modified Wed Oct 19 10:11:20 1994, creator 'HLX2', type 'ONLN', 79024 bytes "PR10 Printing Loop Cares" , at 0x13530 3322 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
100%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| dexmagic
| Picasso 64 Image
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [ONLN] |
macFileCreator | [HLX2] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 18 50 52 31 30 20 50 | 72 69 6e 74 69 6e 67 20 |..PR10 P|rinting |
|00000010| 4c 6f 6f 70 20 43 61 72 | 65 73 00 00 00 00 00 00 |Loop Car|es......|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 4f 4e 4c 4e 48 4c 58 | 32 01 00 00 00 00 00 00 |.ONLNHLX|2.......|
|00000050| 00 00 00 00 01 34 b0 00 | 00 0c fa aa c0 3f 0f aa |.....4..|.....?..|
|00000060| ca d9 88 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 e1 b0 00 00 |........|........|
|00000080| 50 52 20 31 30 20 2d 20 | 41 20 50 72 69 6e 74 69 |PR 10 - |A Printi|
|00000090| 6e 67 20 4c 6f 6f 70 20 | 54 68 61 74 20 43 61 72 |ng Loop |That Car|
|000000a0| 65 73 c9 0d 50 72 69 6e | 74 69 6e 67 09 0d 52 65 |es..Prin|ting..Re|
|000000b0| 76 69 73 65 64 20 62 79 | 3a 09 4d 61 74 74 20 44 |vised by|:.Matt D|
|000000c0| 65 61 74 68 65 72 61 67 | 65 09 4a 61 6e 75 61 72 |eatherag|e.Januar|
|000000d0| 79 20 31 39 39 34 0d 57 | 72 69 74 74 65 6e 20 62 |y 1994.W|ritten b|
|000000e0| 79 3a 09 47 69 6e 67 65 | 72 20 4a 65 72 6e 69 67 |y:.Ginge|r Jernig|
|000000f0| 61 6e 20 26 20 50 65 74 | 65 20 d2 4c 75 6b 65 d3 |an & Pet|e .Luke.|
|00000100| 20 41 6c 65 78 61 6e 64 | 65 72 09 4f 63 74 6f 62 | Alexand|er.Octob|
|00000110| 65 72 20 31 39 39 30 0d | 54 68 69 73 20 54 65 63 |er 1990.|This Tec|
|00000120| 68 6e 69 63 61 6c 20 4e | 6f 74 65 20 64 69 73 63 |hnical N|ote disc|
|00000130| 75 73 73 65 73 20 6f 70 | 65 6e 69 6e 67 20 61 6e |usses op|ening an|
|00000140| 64 20 63 6c 6f 73 69 6e | 67 20 74 68 65 20 50 72 |d closin|g the Pr|
|00000150| 69 6e 74 69 6e 67 20 4d | 61 6e 61 67 65 72 20 77 |inting M|anager w|
|00000160| 69 74 68 20 63 61 6c 6c | 73 20 74 6f 20 5f 50 72 |ith call|s to _Pr|
|00000170| 4f 70 65 6e 20 61 6e 64 | 20 5f 50 72 43 6c 6f 73 |Open and| _PrClos|
|00000180| 65 20 61 73 20 77 65 6c | 6c 20 61 73 20 68 6f 77 |e as wel|l as how|
|00000190| 20 74 6f 20 68 61 6e 64 | 6c 65 20 65 72 72 6f 72 | to hand|le error|
|000001a0| 73 20 61 74 20 70 72 69 | 6e 74 20 74 69 6d 65 2e |s at pri|nt time.|
|000001b0| 0d 43 68 61 6e 67 65 73 | 20 73 69 6e 63 65 20 4f |.Changes| since O|
|000001c0| 63 74 6f 62 65 72 20 31 | 39 39 30 3a 20 20 41 64 |ctober 1|990: Ad|
|000001d0| 64 65 64 20 63 6f 64 65 | 20 69 6e 20 62 6f 74 68 |ded code| in both|
|000001e0| 20 76 65 72 73 69 6f 6e | 73 20 74 6f 20 68 61 6e | version|s to han|
|000001f0| 64 6c 65 20 70 72 69 6e | 74 69 6e 67 20 64 6f 63 |dle prin|ting doc|
|00000200| 75 6d 65 6e 74 73 20 6c | 61 72 67 65 72 20 74 68 |uments l|arger th|
|00000210| 61 6e 20 31 32 38 20 70 | 61 67 65 73 2e 0d 49 6e |an 128 p|ages..In|
|00000220| 74 72 6f 64 75 63 74 69 | 6f 6e 0d 41 74 20 6f 6e |troducti|on.At on|
|00000230| 65 20 74 69 6d 65 2c 20 | 41 70 70 6c 65 20 72 65 |e time, |Apple re|
|00000240| 63 6f 6d 6d 65 6e 64 65 | 64 20 74 68 61 74 20 64 |commende|d that d|
|00000250| 65 76 65 6c 6f 70 65 72 | 73 20 63 61 6c 6c 20 5f |eveloper|s call _|
|00000260| 50 72 4f 70 65 6e 20 61 | 74 20 74 68 65 20 62 65 |PrOpen a|t the be|
|00000270| 67 69 6e 6e 69 6e 67 20 | 6f 66 20 74 68 65 69 72 |ginning |of their|
|00000280| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 61 6e 64 | applica|tion and|
|00000290| 20 5f 50 72 43 6c 6f 73 | 65 20 61 74 20 74 68 65 | _PrClos|e at the|
|000002a0| 20 65 6e 64 2c 20 62 65 | 66 6f 72 65 20 72 65 74 | end, be|fore ret|
|000002b0| 75 72 6e 69 6e 67 20 74 | 6f 20 74 68 65 20 46 69 |urning t|o the Fi|
|000002c0| 6e 64 65 72 2e 20 20 54 | 68 69 73 20 72 65 63 6f |nder. T|his reco|
|000002d0| 6d 6d 65 6e 64 61 74 69 | 6f 6e 20 77 61 73 20 69 |mmendati|on was i|
|000002e0| 6e 20 74 68 65 20 61 6e | 63 69 65 6e 74 20 70 61 |n the an|cient pa|
|000002f0| 73 74 20 77 68 65 6e 20 | 61 6e 20 61 70 70 6c 69 |st when |an appli|
|00000300| 63 61 74 69 6f 6e 20 6f | 6e 6c 79 20 68 61 64 20 |cation o|nly had |
|00000310| 74 6f 20 64 65 61 6c 20 | 77 69 74 68 20 61 20 73 |to deal |with a s|
|00000320| 69 6e 67 6c 65 20 70 72 | 69 6e 74 65 72 20 64 72 |ingle pr|inter dr|
|00000330| 69 76 65 72 2e 0d 41 73 | 20 6d 6f 72 65 20 70 72 |iver..As| more pr|
|00000340| 69 6e 74 65 72 20 64 72 | 69 76 65 72 73 20 62 65 |inter dr|ivers be|
|00000350| 63 61 6d 65 20 61 76 61 | 69 6c 61 62 6c 65 2c 20 |came ava|ilable, |
|00000360| 69 74 20 62 65 63 61 6d | 65 20 69 6d 70 6f 72 74 |it becam|e import|
|00000370| 61 6e 74 20 66 6f 72 20 | 61 6e 20 61 70 70 6c 69 |ant for |an appli|
|00000380| 63 61 74 69 6f 6e 20 74 | 6f 20 63 6f 6e 73 69 64 |cation t|o consid|
|00000390| 65 72 20 74 68 65 20 70 | 72 65 73 65 6e 63 65 20 |er the p|resence |
|000003a0| 6f 66 20 6f 74 68 65 72 | 20 61 70 70 6c 69 63 61 |of other| applica|
|000003b0| 74 69 6f 6e 73 20 61 6e | 64 20 68 6f 77 20 6f 70 |tions an|d how op|
|000003c0| 65 6e 69 6e 67 20 61 6e | 64 20 63 6c 6f 73 69 6e |ening an|d closin|
|000003d0| 67 20 74 68 65 20 70 72 | 69 6e 74 65 72 20 64 72 |g the pr|inter dr|
|000003e0| 69 76 65 72 20 61 66 66 | 65 63 74 65 64 20 74 68 |iver aff|ected th|
|000003f0| 65 6d 2e 20 20 54 68 65 | 20 75 73 65 72 20 63 6f |em. The| user co|
|00000400| 75 6c 64 20 6f 70 65 6e | 20 74 68 65 20 43 68 6f |uld open| the Cho|
|00000410| 6f 73 65 72 20 61 74 20 | 61 6e 79 20 74 69 6d 65 |oser at |any time|
|00000420| 20 61 6e 64 20 63 68 61 | 6e 67 65 20 74 68 65 20 | and cha|nge the |
|00000430| 63 75 72 72 65 6e 74 20 | 70 72 69 6e 74 65 72 20 |current |printer |
|00000440| 64 72 69 76 65 72 20 77 | 69 74 68 6f 75 74 20 74 |driver w|ithout t|
|00000450| 68 65 20 63 75 72 72 65 | 6e 74 20 61 70 70 6c 69 |he curre|nt appli|
|00000460| 63 61 74 69 6f 6e d5 73 | 20 6b 6e 6f 77 6c 65 64 |cation.s| knowled|
|00000470| 67 65 2e 20 20 49 66 20 | 61 6e 20 61 70 70 6c 69 |ge. If |an appli|
|00000480| 63 61 74 69 6f 6e 20 66 | 6f 6c 6c 6f 77 65 64 20 |cation f|ollowed |
|00000490| 74 68 65 20 6f 6c 64 20 | 70 68 69 6c 6f 73 6f 70 |the old |philosop|
|000004a0| 68 79 20 61 6e 64 20 61 | 20 75 73 65 72 20 63 68 |hy and a| user ch|
|000004b0| 61 6e 67 65 64 20 74 68 | 65 20 63 75 72 72 65 6e |anged th|e curren|
|000004c0| 74 20 70 72 69 6e 74 65 | 72 20 64 72 69 76 65 72 |t printe|r driver|
|000004d0| 20 77 68 69 6c 65 20 72 | 75 6e 6e 69 6e 67 20 74 | while r|unning t|
|000004e0| 68 65 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 2c 20 |he appli|cation, |
|000004f0| 74 68 65 20 6e 65 78 74 | 20 74 69 6d 65 20 74 68 |the next| time th|
|00000500| 65 20 75 73 65 72 20 61 | 74 74 65 6d 70 74 65 64 |e user a|ttempted|
|00000510| 20 74 6f 20 70 72 69 6e | 74 2c 20 74 68 65 20 77 | to prin|t, the w|
|00000520| 72 6f 6e 67 20 64 72 69 | 76 65 72 20 77 6f 75 6c |rong dri|ver woul|
|00000530| 64 20 62 65 20 6f 70 65 | 6e 2c 20 74 68 65 20 50 |d be ope|n, the P|
|00000540| 72 69 6e 74 69 6e 67 20 | 4d 61 6e 61 67 65 72 20 |rinting |Manager |
|00000550| 77 6f 75 6c 64 20 6e 6f | 74 20 62 65 20 61 62 6c |would no|t be abl|
|00000560| 65 20 74 6f 20 66 69 6e | 64 20 74 68 65 20 6e 65 |e to fin|d the ne|
|00000570| 63 65 73 73 61 72 79 20 | 72 65 73 6f 75 72 63 65 |cessary |resource|
|00000580| 73 2c 20 61 6e 64 20 74 | 68 65 20 75 73 65 72 20 |s, and t|he user |
|00000590| 77 6f 75 6c 64 20 67 65 | 74 20 61 6e 20 65 72 72 |would ge|t an err|
|000005a0| 6f 72 2e 0d 54 68 65 20 | 43 75 72 72 65 6e 74 20 |or..The |Current |
|000005b0| 52 65 63 6f 6d 6d 65 6e | 64 61 74 69 6f 6e 0d 44 |Recommen|dation.D|
|000005c0| 54 53 20 63 75 72 72 65 | 6e 74 6c 79 20 72 65 63 |TS curre|ntly rec|
|000005d0| 6f 6d 6d 65 6e 64 73 20 | 74 68 61 74 20 61 70 70 |ommends |that app|
|000005e0| 6c 69 63 61 74 69 6f 6e | 73 20 6f 70 65 6e 20 61 |lication|s open a|
|000005f0| 6e 64 20 63 6c 6f 73 65 | 20 74 68 65 20 70 72 69 |nd close| the pri|
|00000600| 6e 74 65 72 20 64 72 69 | 76 65 72 20 65 61 63 68 |nter dri|ver each|
|00000610| 20 74 69 6d 65 20 74 68 | 65 20 61 70 70 6c 69 63 | time th|e applic|
|00000620| 61 74 69 6f 6e 20 75 73 | 65 73 20 74 68 65 20 50 |ation us|es the P|
|00000630| 72 69 6e 74 69 6e 67 20 | 4d 61 6e 61 67 65 72 2e |rinting |Manager.|
|00000640| 0d 4d 50 57 20 50 61 73 | 63 61 6c 0d 2a 2d 2d 2d |.MPW Pas|cal.*---|
|00000650| 2d 2d 2d 20 50 72 69 6e | 74 53 74 75 66 66 20 2d |--- Prin|tStuff -|
|00000660| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000670| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000680| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000690| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2a |--------|-------*|
|000006a0| 7d 0d 7b 2a 2a 0d 20 2a | 2a 09 50 72 69 6e 74 53 |}.{**. *|*.PrintS|
|000006b0| 74 75 66 66 20 77 69 6c | 6c 20 63 61 6c 6c 20 61 |tuff wil|l call a|
|000006c0| 6c 6c 20 6f 66 20 74 68 | 65 20 6e 65 63 65 73 73 |ll of th|e necess|
|000006d0| 61 72 79 20 50 72 69 6e | 74 20 4d 61 6e 61 67 65 |ary Prin|t Manage|
|000006e0| 72 20 63 61 6c 6c 73 20 | 74 6f 20 70 72 69 6e 74 |r calls |to print|
|000006f0| 0d 20 2a 2a 09 61 20 64 | 6f 63 75 6d 65 6e 74 2e |. **.a d|ocument.|
|00000700| 20 20 49 74 20 63 68 65 | 63 6b 73 20 50 72 45 72 | It che|cks PrEr|
|00000710| 72 6f 72 28 29 20 61 66 | 74 65 72 20 65 61 63 68 |ror() af|ter each|
|00000720| 20 50 72 69 6e 74 20 4d | 61 6e 61 67 65 72 20 63 | Print M|anager c|
|00000730| 61 6c 6c 2e 20 20 49 66 | 20 61 6e 0d 20 2a 2a 09 |all. If| an. **.|
|00000740| 65 72 72 6f 72 20 69 73 | 20 66 6f 75 6e 64 2c 20 |error is| found, |
|00000750| 61 6c 6c 20 6f 66 20 74 | 68 65 20 50 72 69 6e 74 |all of t|he Print|
|00000760| 20 4d 61 6e 61 67 65 72 | 20 6f 70 65 6e 20 63 61 | Manager| open ca|
|00000770| 6c 6c 73 20 28 69 2e 65 | 2e 2c 20 50 72 4f 70 65 |lls (i.e|., PrOpe|
|00000780| 6e 2c 0d 20 2a 2a 09 50 | 72 4f 70 65 6e 44 6f 63 |n,. **.P|rOpenDoc|
|00000790| 2e 2e 2e 29 20 77 69 6c | 6c 20 68 61 76 65 20 61 |...) wil|l have a|
|000007a0| 20 63 6f 72 72 65 73 70 | 6f 6e 64 69 6e 67 20 63 | corresp|onding c|
|000007b0| 6c 6f 73 65 20 63 61 6c | 6c 20 62 65 66 6f 72 65 |lose cal|l before|
|000007c0| 20 74 68 65 20 65 72 72 | 6f 72 0d 20 2a 2a 09 69 | the err|or. **.i|
|000007d0| 73 20 70 6f 73 74 65 64 | 20 74 6f 20 74 68 65 20 |s posted| to the |
|000007e0| 75 73 65 72 2e 20 20 59 | 6f 75 20 77 61 6e 74 20 |user. Y|ou want |
|000007f0| 74 6f 20 75 73 65 20 74 | 68 69 73 20 61 70 70 72 |to use t|his appr|
|00000800| 6f 61 63 68 20 74 6f 20 | 6d 61 6b 65 20 73 75 72 |oach to |make sur|
|00000810| 65 20 74 68 65 0d 20 2a | 2a 09 50 72 69 6e 74 20 |e the. *|*.Print |
|00000820| 4d 61 6e 61 67 65 72 20 | 63 6c 6f 73 65 73 20 70 |Manager |closes p|
|00000830| 72 6f 70 65 72 6c 79 20 | 61 6e 64 20 61 6c 6c 20 |roperly |and all |
|00000840| 74 65 6d 70 6f 72 61 72 | 79 20 6d 65 6d 6f 72 79 |temporar|y memory|
|00000850| 20 69 73 20 72 65 6c 65 | 61 73 65 64 2e 0d 20 2a | is rele|ased.. *|
|00000860| 2a 7d 0d 50 52 4f 43 45 | 44 55 52 45 20 50 72 69 |*}.PROCE|DURE Pri|
|00000870| 6e 74 53 74 75 66 66 3b | 0d 56 41 52 0d 20 20 63 |ntStuff;|.VAR. c|
|00000880| 6f 70 69 65 73 2c 0d 20 | 20 66 69 72 73 74 50 61 |opies,. | firstPa|
|00000890| 67 65 2c 0d 20 20 6c 61 | 73 74 50 61 67 65 2c 0d |ge,. la|stPage,.|
|000008a0| 20 20 6c 6f 6f 70 2c 0d | 20 20 6e 75 6d 62 65 72 | loop,.| number|
|000008b0| 4f 66 43 6f 70 69 65 73 | 2c 0d 20 20 70 61 67 65 |OfCopies|,. page|
|000008c0| 4e 75 6d 62 65 72 2c 0d | 20 20 70 72 69 6e 74 6d |Number,.| printm|
|000008d0| 67 72 73 52 65 73 46 69 | 6c 65 2c 0d 20 20 72 65 |grsResFi|le,. re|
|000008e0| 61 6c 4e 75 6d 62 65 72 | 4f 66 50 61 67 65 73 49 |alNumber|OfPagesI|
|000008f0| 6e 44 6f 63 20 20 3a 20 | 49 6e 74 65 67 65 72 3b |nDoc : |Integer;|
|00000900| 0d 20 20 50 72 69 6e 74 | 45 72 72 6f 72 20 20 20 |. Print|Error |
|00000910| 20 20 20 20 20 20 20 20 | 20 20 20 3a 20 4c 6f 6e | | : Lon|
|00000920| 67 49 6e 74 3b 0d 20 20 | 6f 6c 64 50 6f 72 74 20 |gInt;. |oldPort |
|00000930| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000940| 3a 20 47 72 61 66 50 74 | 72 3b 0d 20 20 74 68 65 |: GrafPt|r;. the|
|00000950| 50 72 52 65 63 48 64 6c | 20 20 20 20 20 20 20 20 |PrRecHdl| |
|00000960| 20 20 20 20 20 3a 20 54 | 48 50 72 69 6e 74 3b 0d | : T|HPrint;.|
|00000970| 20 20 74 68 65 50 72 50 | 6f 72 74 20 20 20 20 20 | thePrP|ort |
|00000980| 20 20 20 20 20 20 20 20 | 20 20 3a 20 54 50 50 72 | | : TPPr|
|00000990| 50 6f 72 74 3b 0d 20 20 | 74 68 65 53 74 61 74 75 |Port;. |theStatu|
|000009a0| 73 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |s | |
|000009b0| 3a 20 54 50 72 53 74 61 | 74 75 73 3b 0d 42 45 47 |: TPrSta|tus;.BEG|
|000009c0| 49 4e 0d 20 20 47 65 74 | 50 6f 72 74 28 6f 6c 64 |IN. Get|Port(old|
|000009d0| 50 6f 72 74 29 3b 0d 20 | 20 7b 2a 2a 0d 20 20 20 |Port);. | {**. |
|000009e0| 20 20 20 55 6e 4c 6f 61 | 64 54 68 65 57 6f 72 6c | UnLoa|dTheWorl|
|000009f0| 64 20 77 69 6c 6c 20 73 | 77 61 70 20 6f 75 74 20 |d will s|wap out |
|00000a00| 41 4c 4c 20 75 6e 6e 65 | 65 64 65 64 20 63 6f 64 |ALL unne|eded cod|
|00000a10| 65 20 73 65 67 6d 65 6e | 74 73 20 61 6e 64 20 64 |e segmen|ts and d|
|00000a20| 61 74 61 20 74 68 61 74 | 20 61 72 65 20 4e 4f 54 |ata that| are NOT|
|00000a30| 0d 20 20 20 20 20 20 72 | 65 71 75 69 72 65 64 0d |. r|equired.|
|00000a40| 20 20 20 20 20 20 64 75 | 72 69 6e 67 20 70 72 69 | du|ring pri|
|00000a50| 6e 74 20 74 69 6d 65 2e | 20 59 6f 75 72 20 70 72 |nt time.| Your pr|
|00000a60| 69 6e 74 20 63 6f 64 65 | 20 6d 75 73 74 20 62 65 |int code| must be|
|00000a70| 20 61 20 73 65 70 61 72 | 61 74 65 20 63 6f 64 65 | a separ|ate code|
|00000a80| 20 73 65 67 6d 65 6e 74 | 2e 0d 20 20 2a 2a 7d 0d | segment|.. **}.|
|00000a90| 20 20 55 6e 4c 6f 61 64 | 54 68 65 57 6f 72 6c 64 | UnLoad|TheWorld|
|00000aa0| 3b 0d 20 20 74 68 65 50 | 72 52 65 63 48 64 6c 20 |;. theP|rRecHdl |
|00000ab0| 3a 3d 20 54 48 50 72 69 | 6e 74 28 4e 65 77 48 61 |:= THPri|nt(NewHa|
|00000ac0| 6e 64 6c 65 28 53 49 5a | 45 4f 46 28 54 50 72 69 |ndle(SIZ|EOF(TPri|
|00000ad0| 6e 74 29 29 29 3b 0d 20 | 20 49 46 20 28 4d 65 6d |nt)));. | IF (Mem|
|00000ae0| 45 72 72 6f 72 20 3d 20 | 6e 6f 45 72 72 29 20 41 |Error = |noErr) A|
|00000af0| 4e 44 20 28 74 68 65 50 | 72 52 65 63 48 64 6c 20 |ND (theP|rRecHdl |
|00000b00| 3c 3e 20 4e 49 4c 29 20 | 54 48 45 4e 0d 20 20 20 |<> NIL) |THEN. |
|00000b10| 20 42 45 47 49 4e 0d 20 | 20 20 20 20 20 50 72 4f | BEGIN. | PrO|
|00000b20| 70 65 6e 3b 0d 20 20 20 | 20 20 20 20 20 49 46 20 |pen;. | IF |
|00000b30| 28 50 72 45 72 72 6f 72 | 20 3d 20 6e 6f 45 72 72 |(PrError| = noErr|
|00000b40| 29 20 54 48 45 4e 0d 20 | 20 20 20 20 20 20 20 20 |) THEN. | |
|00000b50| 20 42 45 47 49 4e 0d 20 | 20 20 20 20 20 20 20 20 | BEGIN. | |
|00000b60| 20 20 20 7b 2a 2a 0d 20 | 20 20 20 20 20 20 20 20 | {**. | |
|00000b70| 20 20 20 20 20 20 20 53 | 61 76 65 20 74 68 65 20 | S|ave the |
|00000b80| 63 75 72 72 65 6e 74 20 | 72 65 73 6f 75 72 63 65 |current |resource|
|00000b90| 20 66 69 6c 65 20 28 69 | 2e 65 2e 20 74 68 65 20 | file (i|.e. the |
|00000ba0| 70 72 69 6e 74 65 72 20 | 64 72 69 76 65 72 27 73 |printer |driver's|
|00000bb0| 29 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |). | |
|00000bc0| 20 20 73 6f 20 74 68 65 | 20 64 72 69 76 65 72 20 | so the| driver |
|00000bd0| 77 69 6c 6c 20 6e 6f 74 | 20 6c 6f 73 65 20 69 74 |will not| lose it|
|00000be0| 73 20 72 65 73 6f 75 72 | 63 65 73 20 75 70 6f 6e |s resour|ces upon|
|00000bf0| 20 72 65 74 75 72 6e 20 | 66 72 6f 6d 0d 20 20 20 | return |from. |
|00000c00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 74 68 65 | | the|
|00000c10| 20 70 49 64 6c 65 50 72 | 6f 63 2e 0d 20 20 20 20 | pIdlePr|oc.. |
|00000c20| 20 20 20 20 20 20 20 20 | 20 2a 2a 7d 0d 20 20 20 | | **}. |
|00000c30| 20 20 20 20 20 20 20 20 | 20 70 72 69 6e 74 6d 67 | | printmg|
|00000c40| 72 73 52 65 73 46 69 6c | 65 20 3a 3d 20 43 75 72 |rsResFil|e := Cur|
|00000c50| 52 65 73 46 69 6c 65 3b | 0d 20 20 20 20 20 20 20 |ResFile;|. |
|00000c60| 20 20 20 20 20 50 72 69 | 6e 74 44 65 66 61 75 6c | Pri|ntDefaul|
|00000c70| 74 28 74 68 65 50 72 52 | 65 63 48 64 6c 29 3b 0d |t(thePrR|ecHdl);.|
|00000c80| 20 20 20 20 20 20 20 20 | 20 20 20 20 49 46 20 28 | | IF (|
|00000c90| 50 72 45 72 72 6f 72 20 | 3d 20 6e 6f 45 72 72 29 |PrError |= noErr)|
|00000ca0| 20 54 48 45 4e 0d 20 20 | 20 20 20 20 20 20 20 20 | THEN. | |
|00000cb0| 20 20 20 20 42 45 47 49 | 4e 0d 20 20 20 20 20 20 | BEGI|N. |
|00000cc0| 20 20 20 20 20 20 20 20 | 20 20 49 46 20 28 50 72 | | IF (Pr|
|00000cd0| 53 74 6c 44 69 61 6c 6f | 67 28 74 68 65 50 72 52 |StlDialo|g(thePrR|
|00000ce0| 65 63 48 64 6c 29 29 20 | 54 48 45 4e 0d 20 20 20 |ecHdl)) |THEN. |
|00000cf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 42 | | B|
|00000d00| 45 47 49 4e 0d 20 20 20 | 20 20 20 20 20 20 20 20 |EGIN. | |
|00000d10| 20 20 20 20 20 20 20 20 | 20 7b 2a 2a 0d 20 20 20 | | {**. |
|00000d20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000d30| 20 20 20 20 20 44 65 74 | 65 72 6d 69 6e 65 4e 75 | Det|ermineNu|
|00000d40| 6d 62 65 72 4f 66 50 61 | 67 65 73 69 6e 44 6f 63 |mberOfPa|gesinDoc|
|00000d50| 20 64 65 74 65 72 6d 69 | 6e 65 73 20 74 68 65 20 | determi|nes the |
|00000d60| 6e 75 6d 62 65 72 20 6f | 66 0d 20 20 20 20 20 20 |number o|f. |
|00000d70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000d80| 20 20 70 61 67 65 73 20 | 63 6f 6e 74 61 69 6e 65 | pages |containe|
|00000d90| 64 20 69 6e 20 74 68 65 | 20 64 6f 63 75 6d 65 6e |d in the| documen|
|00000da0| 74 20 62 79 20 63 6f 6d | 70 61 72 69 6e 67 20 74 |t by com|paring t|
|00000db0| 68 65 20 73 69 7a 65 20 | 6f 66 0d 20 20 20 20 20 |he size |of. |
|00000dc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000dd0| 20 20 20 74 68 65 20 64 | 6f 63 75 6d 65 6e 74 20 | the d|ocument |
|00000de0| 77 69 74 68 20 72 50 61 | 67 65 20 66 72 6f 6d 20 |with rPa|ge from |
|00000df0| 74 68 65 20 54 50 72 49 | 6e 66 6f 20 72 65 63 6f |the TPrI|nfo reco|
|00000e00| 72 64 20 28 49 4d 20 49 | 49 2d 31 35 30 29 2e 0d |rd (IM I|I-150)..|
|00000e10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000e20| 20 20 20 20 20 20 20 20 | 49 74 20 72 65 74 75 72 | |It retur|
|00000e30| 6e 73 20 74 68 65 20 6e | 75 6d 62 65 72 20 6f 66 |ns the n|umber of|
|00000e40| 20 70 61 67 65 73 20 72 | 65 71 75 69 72 65 64 20 | pages r|equired |
|00000e50| 74 6f 20 70 72 69 6e 74 | 20 74 68 65 0d 20 20 20 |to print| the. |
|00000e60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000e70| 20 20 20 20 20 64 6f 63 | 75 6d 65 6e 74 20 66 6f | doc|ument fo|
|00000e80| 72 20 74 68 65 20 63 75 | 72 72 65 6e 74 6c 79 20 |r the cu|rrently |
|00000e90| 73 65 6c 65 63 74 65 64 | 20 70 72 69 6e 74 65 72 |selected| printer|
|00000ea0| 2e 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|00000eb0| 20 20 20 20 20 20 20 2a | 2a 7d 0d 20 20 20 20 20 | *|*}. |
|00000ec0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 72 | | r|
|00000ed0| 65 61 6c 4e 75 6d 62 65 | 72 4f 66 50 61 67 65 73 |ealNumbe|rOfPages|
|00000ee0| 69 6e 44 6f 63 20 3a 3d | 20 44 65 74 65 72 6d 69 |inDoc :=| Determi|
|00000ef0| 6e 65 4e 75 6d 62 65 72 | 4f 66 50 61 67 65 73 69 |neNumber|OfPagesi|
|00000f00| 6e 44 6f 63 0d 20 20 20 | 20 20 20 20 20 20 20 20 |nDoc. | |
|00000f10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000f20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000f30| 20 20 20 20 20 20 20 28 | 74 68 65 50 72 52 65 63 | (|thePrRec|
|00000f40| 48 64 6c 5e 5e 2e 70 72 | 49 6e 66 6f 2e 72 50 61 |Hdl^^.pr|Info.rPa|
|00000f50| 67 65 29 3b 0d 20 20 20 | 20 20 20 20 20 20 20 20 |ge);. | |
|00000f60| 20 20 20 20 20 20 20 20 | 20 49 46 20 28 50 72 4a | | IF (PrJ|
|00000f70| 6f 62 44 69 61 6c 6f 67 | 28 74 68 65 50 72 52 65 |obDialog|(thePrRe|
|00000f80| 63 48 64 6c 29 29 20 54 | 48 45 4e 20 0d 20 20 20 |cHdl)) T|HEN . |
|00000f90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000fa0| 20 20 20 42 45 47 49 4e | 0d 20 20 20 20 20 20 20 | BEGIN|. |
|00000fb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000fc0| 20 7b 2a 2a 0d 20 20 20 | 20 20 20 20 20 20 20 20 | {**. | |
|00000fd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000fe0| 20 47 65 74 20 74 68 65 | 20 6e 75 6d 62 65 72 20 | Get the| number |
|00000ff0| 6f 66 20 63 6f 70 69 65 | 73 20 6f 66 20 74 68 65 |of copie|s of the|
|00001000| 20 64 6f 63 75 6d 65 6e | 74 20 74 68 61 74 20 74 | documen|t that t|
|00001010| 68 65 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |he. | |
|00001020| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 75 | | u|
|00001030| 73 65 72 20 77 61 6e 74 | 73 20 70 72 69 6e 74 65 |ser want|s printe|
|00001040| 64 20 66 72 6f 6d 20 69 | 43 6f 70 69 65 73 20 6f |d from i|Copies o|
|00001050| 66 20 74 68 65 20 54 50 | 72 4a 6f 62 20 72 65 63 |f the TP|rJob rec|
|00001060| 6f 72 64 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |ord. | |
|00001070| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001080| 28 49 4d 20 49 49 2d 31 | 35 31 29 2e 0d 20 20 20 |(IM II-1|51).. |
|00001090| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000010a0| 20 20 20 20 20 20 2a 2a | 7d 0d 20 20 20 20 20 20 | **|}. |
|000010b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000010c0| 20 20 6e 75 6d 62 65 72 | 4f 66 43 6f 70 69 65 73 | number|OfCopies|
|000010d0| 20 3a 3d 20 74 68 65 50 | 72 52 65 63 48 64 6c 5e | := theP|rRecHdl^|
|000010e0| 5e 2e 70 72 4a 6f 62 2e | 69 43 6f 70 69 65 73 3b |^.prJob.|iCopies;|
|000010f0| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001100| 20 20 20 20 20 20 20 20 | 20 7b 2a 2a 0d 20 20 20 | | {**. |
|00001110| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001120| 20 20 20 20 20 20 20 20 | 20 47 65 74 20 74 68 65 | | Get the|
|00001130| 20 66 69 72 73 74 20 61 | 6e 64 20 6c 61 73 74 20 | first a|nd last |
|00001140| 70 61 67 65 73 20 6f 66 | 20 74 68 65 20 64 6f 63 |pages of| the doc|
|00001150| 75 6d 65 6e 74 20 74 68 | 61 74 0d 20 20 20 20 20 |ument th|at. |
|00001160| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001170| 20 20 20 20 20 20 20 77 | 65 72 65 20 72 65 71 75 | w|ere requ|
|00001180| 65 73 74 65 64 20 74 6f | 20 62 65 20 70 72 69 6e |ested to| be prin|
|00001190| 74 65 64 20 62 79 20 74 | 68 65 20 75 73 65 72 20 |ted by t|he user |
|000011a0| 66 72 6f 6d 20 69 46 73 | 74 50 61 67 65 0d 20 20 |from iFs|tPage. |
|000011b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000011c0| 20 20 20 20 20 20 20 20 | 20 20 61 6e 64 20 69 4c | | and iL|
|000011d0| 61 73 74 50 61 67 65 20 | 66 72 6f 6d 20 74 68 65 |astPage |from the|
|000011e0| 20 54 50 72 4a 6f 62 20 | 72 65 63 6f 72 64 20 28 | TPrJob |record (|
|000011f0| 49 4d 20 49 49 2d 31 35 | 31 29 2e 0d 20 20 20 20 |IM II-15|1).. |
|00001200| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001210| 20 20 20 20 20 2a 2a 7d | 0d 20 20 20 20 20 20 20 | **}|. |
|00001220| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001230| 20 66 69 72 73 74 50 61 | 67 65 20 3a 3d 20 74 68 | firstPa|ge := th|
|00001240| 65 50 72 52 65 63 48 64 | 6c 5e 5e 2e 70 72 4a 6f |ePrRecHd|l^^.prJo|
|00001250| 62 2e 69 46 73 74 50 61 | 67 65 3b 0d 20 20 20 20 |b.iFstPa|ge;. |
|00001260| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001270| 20 20 20 20 6c 61 73 74 | 50 61 67 65 20 3a 3d 20 | last|Page := |
|00001280| 74 68 65 50 72 52 65 63 | 48 64 6c 5e 5e 2e 70 72 |thePrRec|Hdl^^.pr|
|00001290| 4a 6f 62 2e 69 4c 73 74 | 50 61 67 65 3b 0d 20 20 |Job.iLst|Page;. |
|000012a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000012b0| 20 20 20 20 20 20 7b 2a | 2a 0d 20 20 20 20 20 20 | {*|*. |
|000012c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000012d0| 20 20 20 20 20 20 50 72 | 69 6e 74 20 22 61 6c 6c | Pr|int "all|
|000012e0| 22 20 70 61 67 65 73 20 | 69 6e 20 74 68 65 20 70 |" pages |in the p|
|000012f0| 72 69 6e 74 20 6c 6f 6f | 70 0d 20 20 20 20 20 20 |rint loo|p. |
|00001300| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001310| 20 20 20 2a 2a 7d 0d 20 | 20 20 20 20 20 20 20 20 | **}. | |
|00001320| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 74 | | t|
|00001330| 68 65 50 72 52 65 63 48 | 64 6c 5e 5e 2e 70 72 4a |hePrRecH|dl^^.prJ|
|00001340| 6f 62 2e 69 46 73 74 50 | 61 67 65 20 3a 3d 20 31 |ob.iFstP|age := 1|
|00001350| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;. | |
|00001360| 20 20 20 20 20 20 20 20 | 20 20 74 68 65 50 72 52 | | thePrR|
|00001370| 65 63 48 64 6c 5e 5e 2e | 70 72 4a 6f 62 2e 69 4c |ecHdl^^.|prJob.iL|
|00001380| 73 74 50 61 67 65 20 3a | 3d 20 39 39 39 39 3b 0d |stPage :|= 9999;.|
|00001390| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000013a0| 20 20 20 20 20 20 20 20 | 7b 2a 2a 0d 20 20 20 20 | |{**. |
|000013b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000013c0| 20 20 20 20 20 20 20 20 | 44 65 74 65 72 6d 69 6e | |Determin|
|000013d0| 65 20 74 68 65 20 22 72 | 65 61 6c 22 20 6e 75 6d |e the "r|eal" num|
|000013e0| 62 65 72 20 6f 66 20 70 | 61 67 65 73 20 63 6f 6e |ber of p|ages con|
|000013f0| 74 61 69 6e 65 64 20 69 | 6e 0d 20 20 20 20 20 20 |tained i|n. |
|00001400| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001410| 20 20 20 20 20 20 74 68 | 65 20 64 6f 63 75 6d 65 | th|e docume|
|00001420| 6e 74 2e 20 20 57 69 74 | 68 6f 75 74 20 74 68 69 |nt. Wit|hout thi|
|00001430| 73 20 74 65 73 74 2c 20 | 79 6f 75 20 77 6f 75 6c |s test, |you woul|
|00001440| 64 20 70 72 69 6e 74 0d | 20 20 20 20 20 20 20 20 |d print.| |
|00001450| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001460| 20 20 20 20 39 39 39 39 | 20 70 61 67 65 73 2e 0d | 9999| pages..|
|00001470| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001480| 20 20 20 20 20 20 20 20 | 20 2a 2a 7d 0d 20 20 20 | | **}. |
|00001490| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000014a0| 20 20 20 20 20 49 46 20 | 28 72 65 61 6c 4e 75 6d | IF |(realNum|
|000014b0| 62 65 72 4f 66 50 61 67 | 65 73 69 6e 44 6f 63 20 |berOfPag|esinDoc |
|000014c0| 3c 20 6c 61 73 74 50 61 | 67 65 29 20 54 48 45 4e |< lastPa|ge) THEN|
|000014d0| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000014e0| 20 20 20 20 20 20 20 20 | 20 20 20 6c 61 73 74 50 | | lastP|
|000014f0| 61 67 65 20 3a 3d 20 72 | 65 61 6c 4e 75 6d 62 65 |age := r|ealNumbe|
|00001500| 72 4f 66 50 61 67 65 73 | 69 6e 44 6f 63 3b 0d 20 |rOfPages|inDoc;. |
|00001510| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001520| 20 20 20 20 20 20 20 50 | 72 69 6e 74 69 6e 67 53 | P|rintingS|
|00001530| 74 61 74 75 73 44 69 61 | 6c 6f 67 20 3a 3d 20 47 |tatusDia|log := G|
|00001540| 65 74 4e 65 77 44 69 61 | 6c 6f 67 28 32 35 37 2c |etNewDia|log(257,|
|00001550| 20 4e 49 4c 2c 20 50 4f | 49 4e 54 45 52 28 2d 31 | NIL, PO|INTER(-1|
|00001560| 29 29 3b 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |));. | |
|00001570| 20 20 20 20 20 20 20 20 | 20 20 20 20 0d 20 20 20 | | . |
|00001580| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001590| 20 20 20 20 20 7b 2a 2a | 0d 20 20 20 20 20 20 20 | {**|. |
|000015a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000015b0| 20 20 20 20 20 50 72 69 | 6e 74 20 74 68 65 20 6e | Pri|nt the n|
|000015c0| 75 6d 62 65 72 20 6f 66 | 20 63 6f 70 69 65 73 20 |umber of| copies |
|000015d0| 6f 66 20 64 6f 63 75 6d | 65 6e 74 20 72 65 71 75 |of docum|ent requ|
|000015e0| 65 73 74 65 64 20 62 79 | 20 74 68 65 0d 09 09 09 |ested by| the....|
|000015f0| 20 20 20 20 20 20 75 73 | 65 72 0d 20 20 20 20 20 | us|er. |
|00001600| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001610| 20 20 20 20 20 20 20 66 | 72 6f 6d 20 74 68 65 20 | f|rom the |
|00001620| 50 72 69 6e 74 20 4a 6f | 62 20 44 69 61 6c 6f 67 |Print Jo|b Dialog|
|00001630| 2e 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|00001640| 20 20 20 20 20 20 20 20 | 20 20 20 2a 2a 7d 0d 20 | | **}. |
|00001650| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001660| 20 20 20 20 20 20 20 46 | 6f 72 20 63 6f 70 69 65 | F|or copie|
|00001670| 73 20 3a 3d 20 31 20 54 | 6f 20 6e 75 6d 62 65 72 |s := 1 T|o number|
|00001680| 4f 66 43 6f 70 69 65 73 | 20 44 6f 0d 20 20 20 20 |OfCopies| Do. |
|00001690| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000016a0| 20 20 20 20 20 20 42 45 | 47 49 4e 0d 20 20 20 20 | BE|GIN. |
|000016b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000016c0| 20 20 20 20 20 20 20 20 | 7b 2a 2a 0d 20 20 20 20 | |{**. |
|000016d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000016e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 49 6e 73 74 | | Inst|
|000016f0| 61 6c 6c 20 61 20 70 6f | 69 6e 74 65 72 20 74 6f |all a po|inter to|
|00001700| 20 79 6f 75 72 20 70 49 | 64 6c 65 20 70 72 6f 63 | your pI|dle proc|
|00001710| 20 69 6e 20 6d 79 20 70 | 72 69 6e 74 20 72 65 63 | in my p|rint rec|
|00001720| 6f 72 64 2e 0d 20 20 20 | 20 20 20 20 20 20 20 20 |ord.. | |
|00001730| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001740| 20 20 2a 2a 7d 0d 20 20 | 20 20 20 20 20 20 20 20 | **}. | |
|00001750| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001760| 20 20 20 74 68 65 50 72 | 52 65 63 48 64 6c 5e 5e | thePr|RecHdl^^|
|00001770| 2e 70 72 4a 6f 62 2e 70 | 49 64 6c 65 50 72 6f 63 |.prJob.p|IdleProc|
|00001780| 20 3a 3d 20 40 63 68 65 | 63 6b 4d 79 50 72 69 6e | := @che|ckMyPrin|
|00001790| 74 44 69 61 6c 6f 67 42 | 75 74 74 6f 6e 3b 0d 20 |tDialogB|utton;. |
|000017a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000017b0| 20 20 20 20 20 20 20 20 | 20 20 20 7b 2a 2a 0d 20 | | {**. |
|000017c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000017d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 52 | | R|
|000017e0| 65 73 74 6f 72 65 20 74 | 68 65 20 72 65 73 6f 75 |estore t|he resou|
|000017f0| 72 63 65 20 66 69 6c 65 | 20 74 6f 20 74 68 65 20 |rce file| to the |
|00001800| 70 72 69 6e 74 65 72 20 | 64 72 69 76 65 72 27 73 |printer |driver's|
|00001810| 2e 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|00001820| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2a | | *|
|00001830| 2a 7d 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |*}. | |
|00001840| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 55 | | U|
|00001850| 73 65 52 65 73 46 69 6c | 65 28 70 72 69 6e 74 6d |seResFil|e(printm|
|00001860| 67 72 73 52 65 73 46 69 | 6c 65 29 3b 0d 20 20 20 |grsResFi|le);. |
|00001870| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001880| 20 20 20 20 20 20 20 20 | 20 74 68 65 50 72 50 6f | | thePrPo|
|00001890| 72 74 20 3a 3d 20 50 72 | 4f 70 65 6e 44 6f 63 28 |rt := Pr|OpenDoc(|
|000018a0| 74 68 65 50 72 52 65 63 | 48 64 6c 2c 20 4e 49 4c |thePrRec|Hdl, NIL|
|000018b0| 2c 20 4e 49 4c 29 3b 0d | 20 20 20 20 20 20 20 20 |, NIL);.| |
|000018c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000018d0| 20 20 20 20 49 46 20 28 | 50 72 45 72 72 6f 72 20 | IF (|PrError |
|000018e0| 3d 20 6e 6f 45 72 72 29 | 20 54 48 45 4e 0d 20 20 |= noErr)| THEN. |
|000018f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001900| 20 20 20 20 20 20 20 20 | 20 20 20 20 42 45 47 49 | | BEGI|
|00001910| 4e 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |N. | |
|00001920| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001930| 20 20 7b 2a 2a 0d 20 20 | 20 20 20 20 20 20 20 20 | {**. | |
|00001940| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001950| 20 20 20 20 20 20 20 20 | 20 20 50 72 69 6e 74 20 | | Print |
|00001960| 74 68 65 20 72 61 6e 67 | 65 20 6f 66 20 70 61 67 |the rang|e of pag|
|00001970| 65 73 20 6f 66 20 74 68 | 65 20 64 6f 63 75 6d 65 |es of th|e docume|
|00001980| 6e 74 20 72 65 71 75 65 | 73 74 65 64 0d 20 20 20 |nt reque|sted. |
|00001990| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000019a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000019b0| 20 62 79 20 74 68 65 20 | 75 73 65 72 20 66 72 6f | by the |user fro|
|000019c0| 6d 20 74 68 65 20 50 72 | 69 6e 74 20 4a 6f 62 20 |m the Pr|int Job |
|000019d0| 44 69 61 6c 6f 67 2e 0d | 20 20 20 20 20 20 20 20 |Dialog..| |
|000019e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000019f0| 20 20 20 20 20 20 20 20 | 20 2a 2a 7d 0d 20 20 20 | | **}. |
|00001a00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001a10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 70 61 67 | | pag|
|00001a20| 65 4e 75 6d 62 65 72 20 | 3a 3d 20 66 69 72 73 74 |eNumber |:= first|
|00001a30| 50 61 67 65 3b 0d 20 20 | 20 20 20 20 20 20 20 20 |Page;. | |
|00001a40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001a50| 20 20 20 20 20 20 57 48 | 49 4c 45 20 28 28 70 61 | WH|ILE ((pa|
|00001a60| 67 65 4e 75 6d 62 65 72 | 20 3c 3d 20 6c 61 73 74 |geNumber| <= last|
|00001a70| 50 61 67 65 29 20 41 4e | 44 20 28 50 72 45 72 72 |Page) AN|D (PrErr|
|00001a80| 6f 72 20 3d 20 6e 6f 45 | 72 72 29 29 20 44 4f 0d |or = noE|rr)) DO.|
|00001a90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001aa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001ab0| 20 20 42 45 47 49 4e 0d | 09 09 09 09 09 20 20 0d | BEGIN.|..... .|
|00001ac0| 09 09 09 09 20 20 20 20 | 7b 20 2a 2a 0d 09 09 09 |.... |{ **....|
|00001ad0| 09 09 49 66 20 77 65 27 | 76 65 20 63 72 6f 73 73 |..If we'|ve cross|
|00001ae0| 65 64 20 61 20 31 32 38 | 2d 70 61 67 65 20 62 6f |ed a 128|-page bo|
|00001af0| 75 6e 64 61 72 79 2c 0d | 09 09 09 09 09 63 6c 6f |undary,.|.....clo|
|00001b00| 73 65 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 70 |se the c|urrent p|
|00001b10| 72 69 6e 74 20 66 69 6c | 65 2c 20 73 65 6e 64 20 |rint fil|e, send |
|00001b20| 69 74 0d 09 09 09 09 09 | 74 6f 20 74 68 65 20 70 |it......|to the p|
|00001b30| 72 69 6e 74 65 72 20 69 | 66 20 6e 65 63 65 73 73 |rinter i|f necess|
|00001b40| 61 72 79 2c 20 61 6e 64 | 20 6f 70 65 6e 20 61 0d |ary, and| open a.|
|00001b50| 09 09 09 09 09 6e 65 77 | 20 64 6f 63 75 6d 65 6e |.....new| documen|
|00001b60| 74 2e 0d 09 09 09 09 20 | 20 20 20 2a 2a 20 7d 0d |t...... | ** }.|
|00001b70| 09 09 09 09 09 20 20 0d | 09 09 09 09 20 20 20 20 |..... .|.... |
|00001b80| 49 46 20 28 70 61 67 65 | 4e 75 6d 62 65 72 20 2d |IF (page|Number -|
|00001b90| 20 66 69 72 73 74 50 61 | 67 65 29 20 4d 4f 44 20 | firstPa|ge) MOD |
|00001ba0| 69 50 46 4d 61 78 50 67 | 73 20 3d 20 30 20 54 48 |iPFMaxPg|s = 0 TH|
|00001bb0| 45 4e 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |EN. | |
|00001bc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001bd0| 20 20 20 20 20 20 20 20 | 20 42 45 47 49 4e 0d 20 | | BEGIN. |
|00001be0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001bf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001c00| 20 20 20 20 20 20 20 49 | 46 20 70 61 67 65 4e 75 | I|F pageNu|
|00001c10| 6d 62 65 72 20 3c 3e 20 | 66 69 72 73 74 50 61 67 |mber <> |firstPag|
|00001c20| 65 20 54 48 45 4e 0d 20 | 20 20 20 20 20 20 20 20 |e THEN. | |
|00001c30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001c40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001c50| 20 42 45 47 49 4e 0d 20 | 20 20 20 20 20 20 20 20 | BEGIN. | |
|00001c60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001c70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001c80| 20 20 20 50 72 43 6c 6f | 73 65 44 6f 63 28 74 68 | PrClo|seDoc(th|
|00001c90| 65 50 72 50 6f 72 74 29 | 3b 0d 20 20 20 20 20 20 |ePrPort)|;. |
|00001ca0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001cb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001cc0| 20 20 20 20 20 20 49 46 | 20 28 74 68 65 50 72 52 | IF| (thePrR|
|00001cd0| 65 63 48 64 6c 5e 5e 2e | 70 72 4a 6f 62 2e 62 4a |ecHdl^^.|prJob.bJ|
|00001ce0| 44 6f 63 4c 6f 6f 70 20 | 3d 20 62 53 70 6f 6f 6c |DocLoop |= bSpool|
|00001cf0| 4c 6f 6f 70 29 0d 20 20 | 20 20 20 20 20 20 20 20 |Loop). | |
|00001d00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001d10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001d20| 20 20 20 20 41 4e 44 20 | 28 50 72 45 72 72 6f 72 | AND |(PrError|
|00001d30| 20 3d 20 6e 6f 45 72 72 | 29 20 54 48 45 4e 0d 20 | = noErr|) THEN. |
|00001d40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001d50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001d60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 50 72 50 | | PrP|
|00001d70| 69 63 46 69 6c 65 28 74 | 68 65 50 72 52 65 63 48 |icFile(t|hePrRecH|
|00001d80| 64 6c 2c 20 4e 49 4c 2c | 4e 49 4c 2c 20 4e 49 4c |dl, NIL,|NIL, NIL|
|00001d90| 2c 20 74 68 65 53 74 61 | 74 75 73 29 3b 0d 20 20 |, theSta|tus);. |
|00001da0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001db0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001dc0| 20 20 20 20 20 20 20 20 | 20 20 74 68 65 50 72 50 | | thePrP|
|00001dd0| 6f 72 74 20 3a 3d 20 50 | 72 4f 70 65 6e 44 6f 63 |ort := P|rOpenDoc|
|00001de0| 28 74 68 65 50 72 52 65 | 63 48 64 6c 2c 20 4e 49 |(thePrRe|cHdl, NI|
|00001df0| 4c 2c 20 4e 49 4c 29 3b | 0d 20 20 20 20 20 20 20 |L, NIL);|. |
|00001e00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001e10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001e20| 20 20 20 45 4e 44 3b 0d | 20 20 20 20 20 20 20 20 | END;.| |
|00001e30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001e40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001e50| 45 4e 44 3b 0d 09 09 09 | 09 20 20 20 20 20 20 50 |END;....|. P|
|00001e60| 72 4f 70 65 6e 50 61 67 | 65 28 74 68 65 50 72 50 |rOpenPag|e(thePrP|
|00001e70| 6f 72 74 2c 20 4e 49 4c | 29 3b 0d 20 20 20 20 20 |ort, NIL|);. |
|00001e80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001e90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001ea0| 20 49 46 20 28 50 72 45 | 72 72 6f 72 20 3d 20 6e | IF (PrE|rror = n|
|00001eb0| 6f 45 72 72 29 20 54 48 | 45 4e 0d 20 20 20 20 20 |oErr) TH|EN. |
|00001ec0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001ed0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001ee0| 20 20 20 42 45 47 49 4e | 0d 20 20 20 20 20 20 20 | BEGIN|. |
|00001ef0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001f00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001f10| 20 20 20 7b 2a 2a 0d 20 | 20 20 20 20 20 20 20 20 | {**. | |
|00001f20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001f30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001f40| 20 20 20 20 20 72 50 61 | 67 65 20 28 49 4d 20 49 | rPa|ge (IM I|
|00001f50| 49 2d 31 35 30 29 20 69 | 73 20 74 68 65 20 70 72 |I-150) i|s the pr|
|00001f60| 69 6e 74 61 62 6c 65 0d | 20 20 20 20 20 20 20 20 |intable.| |
|00001f70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001f80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001f90| 20 20 20 20 20 20 61 72 | 65 61 20 66 6f 72 20 74 | ar|ea for t|
|00001fa0| 68 65 20 63 75 72 72 65 | 6e 74 6c 79 20 73 65 6c |he curre|ntly sel|
|00001fb0| 65 63 74 65 64 20 70 72 | 69 6e 74 65 72 2e 0d 20 |ected pr|inter.. |
|00001fc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001fd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001fe0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 42 79 20 | | By |
|00001ff0| 70 61 73 73 69 6e 67 20 | 74 68 65 20 63 75 72 72 |passing |the curr|
|00002000| 65 6e 74 20 65 6e 61 62 | 6c 65 73 20 79 6f 75 72 |ent enab|les your|
|00002010| 20 61 70 70 20 74 6f 20 | 75 73 65 0d 09 09 09 09 | app to |use.....|
|00002020| 09 20 20 20 20 20 20 74 | 68 65 20 73 61 6d 65 20 |. t|he same |
|00002030| 72 6f 75 74 69 6e 65 20 | 74 6f 20 64 72 61 77 20 |routine |to draw |
|00002040| 74 6f 20 74 68 65 20 73 | 63 72 65 65 6e 20 61 6e |to the s|creen an|
|00002050| 64 20 74 68 65 0d 09 09 | 09 09 09 20 20 20 20 20 |d the...|... |
|00002060| 20 70 72 69 6e 74 65 72 | 27 73 20 47 72 61 66 50 | printer|'s GrafP|
|00002070| 6f 72 74 2e 0d 20 20 20 | 20 20 20 20 20 20 20 20 |ort.. | |
|00002080| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002090| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000020a0| 2a 2a 7d 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |**}. | |
|000020b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000020c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 44 72 | | Dr|
|000020d0| 61 77 53 74 75 66 66 20 | 28 74 68 65 50 72 52 65 |awStuff |(thePrRe|
|000020e0| 63 48 64 6c 5e 5e 2e 70 | 72 49 6e 66 6f 2e 72 50 |cHdl^^.p|rInfo.rP|
|000020f0| 61 67 65 2c 20 0d 20 20 | 20 20 20 20 20 20 20 20 |age, . | |
|00002100| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002110| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002120| 20 20 20 20 20 20 20 20 | 20 20 20 47 72 61 66 50 | | GrafP|
|00002130| 74 72 20 28 74 68 65 50 | 72 50 6f 72 74 29 2c 20 |tr (theP|rPort), |
|00002140| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00002150| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002160| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002170| 20 20 20 20 20 20 70 61 | 67 65 4e 75 6d 62 65 72 | pa|geNumber|
|00002180| 29 3b 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |);. | |
|00002190| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000021a0| 20 20 20 20 20 20 20 20 | 20 20 20 45 4e 44 3b 0d | | END;.|
|000021b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000021c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000021d0| 20 20 20 20 20 20 50 72 | 43 6c 6f 73 65 50 61 67 | Pr|ClosePag|
|000021e0| 65 28 74 68 65 50 72 50 | 6f 72 74 29 3b 0d 20 20 |e(thePrP|ort);. |
|000021f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002200| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002210| 20 20 20 20 70 61 67 65 | 4e 75 6d 62 65 72 20 3a | page|Number :|
|00002220| 3d 20 70 61 67 65 4e 75 | 6d 62 65 72 20 2b 20 31 |= pageNu|mber + 1|
|00002230| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;. | |
|00002240| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002250| 20 20 20 20 45 4e 44 3b | 20 20 7b 2a 2a 20 20 45 | END;| {** E|
|00002260| 6e 64 20 70 61 67 65 6e | 75 6d 62 65 72 20 6c 6f |nd pagen|umber lo|
|00002270| 6f 70 20 20 2a 2a 7d 0d | 20 20 20 20 20 20 20 20 |op **}.| |
|00002280| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002290| 20 20 20 20 20 20 45 4e | 44 3b 0d 20 20 20 20 20 | EN|D;. |
|000022a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000022b0| 20 20 20 20 20 20 20 50 | 72 43 6c 6f 73 65 44 6f | P|rCloseDo|
|000022c0| 63 28 74 68 65 50 72 50 | 6f 72 74 29 3b 0d 20 20 |c(thePrP|ort);. |
|000022d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000022e0| 20 20 20 20 20 20 20 20 | 45 4e 44 3b 20 20 7b 2a | |END; {*|
|000022f0| 2a 20 20 45 6e 64 20 63 | 6f 70 69 65 73 20 6c 6f |* End c|opies lo|
|00002300| 6f 70 20 20 2a 2a 7d 0d | 20 20 20 20 20 20 20 20 |op **}.| |
|00002310| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002320| 20 20 7b 2a 2a 0d 20 20 | 20 20 20 20 20 20 20 20 | {**. | |
|00002330| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002340| 20 20 20 20 54 68 65 20 | 70 72 69 6e 74 69 6e 67 | The |printing|
|00002350| 20 6a 6f 62 20 69 73 20 | 62 65 69 6e 67 20 63 61 | job is |being ca|
|00002360| 6e 63 65 6c 65 64 20 62 | 79 20 74 68 65 20 72 65 |nceled b|y the re|
|00002370| 71 75 65 73 74 20 6f 66 | 0d 20 20 20 20 20 20 20 |quest of|. |
|00002380| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002390| 20 20 20 20 20 20 20 74 | 68 65 20 75 73 65 72 20 | t|he user |
|000023a0| 66 72 6f 6d 20 74 68 65 | 20 50 72 69 6e 74 20 53 |from the| Print S|
|000023b0| 74 79 6c 65 20 44 69 61 | 6c 6f 67 20 6f 72 20 74 |tyle Dia|log or t|
|000023c0| 68 65 20 50 72 69 6e 74 | 20 4a 6f 62 0d 20 20 20 |he Print| Job. |
|000023d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000023e0| 20 20 20 20 20 20 20 20 | 20 20 20 44 69 61 6c 6f | | Dialo|
|000023f0| 67 2e 20 20 50 72 45 72 | 72 6f 72 20 77 69 6c 6c |g. PrEr|ror will|
|00002400| 20 62 65 20 73 65 74 20 | 74 6f 20 69 50 72 41 62 | be set |to iPrAb|
|00002410| 6f 72 74 20 74 6f 20 74 | 65 6c 6c 20 74 68 65 0d |ort to t|ell the.|
|00002420| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002430| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 50 72 | | Pr|
|00002440| 69 6e 74 20 4d 61 6e 61 | 67 65 72 20 74 6f 20 61 |int Mana|ger to a|
|00002450| 62 6f 72 74 20 74 68 65 | 20 63 75 72 72 65 6e 74 |bort the| current|
|00002460| 20 70 72 69 6e 74 69 6e | 67 20 6a 6f 62 2e 0d 20 | printin|g job.. |
|00002470| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002480| 20 20 20 20 20 20 20 20 | 20 20 2a 2a 7d 0d 20 20 | | **}. |
|00002490| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000024a0| 20 20 20 20 45 4e 44 0d | 20 20 20 20 20 20 20 20 | END.| |
|000024b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000024c0| 45 4c 53 45 0d 20 20 20 | 20 20 20 20 20 20 20 20 |ELSE. | |
|000024d0| 20 20 20 20 20 20 20 20 | 20 20 20 50 72 53 65 74 | | PrSet|
|000024e0| 45 72 72 6f 72 28 69 50 | 72 41 62 6f 72 74 29 3b |Error(iP|rAbort);|
|000024f0| 20 20 20 7b 2a 2a 20 20 | 43 61 6e 63 65 6c 20 66 | {** |Cancel f|
|00002500| 72 6f 6d 20 74 68 65 20 | 6a 6f 62 20 64 69 61 6c |rom the |job dial|
|00002510| 6f 67 20 20 2a 2a 7d 0d | 20 20 20 20 20 20 20 20 |og **}.| |
|00002520| 20 20 20 20 20 20 20 20 | 20 20 45 4e 44 0d 20 20 | | END. |
|00002530| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002540| 20 20 45 4c 53 45 0d 20 | 20 20 20 20 20 20 20 20 | ELSE. | |
|00002550| 20 20 20 20 20 20 20 20 | 20 50 72 53 65 74 45 72 | | PrSetEr|
|00002560| 72 6f 72 28 69 50 72 41 | 62 6f 72 74 29 3b 20 20 |ror(iPrA|bort); |
|00002570| 20 7b 2a 2a 20 20 43 61 | 6e 63 65 6c 20 66 72 6f | {** Ca|ncel fro|
|00002580| 6d 20 74 68 65 20 73 74 | 79 6c 65 20 64 69 61 6c |m the st|yle dial|
|00002590| 6f 67 20 20 2a 2a 7d 0d | 20 20 20 20 20 20 20 20 |og **}.| |
|000025a0| 20 20 20 20 20 20 45 4e | 44 3b 0d 20 20 20 20 20 | EN|D;. |
|000025b0| 20 20 20 20 20 45 4e 44 | 3b 0d 20 20 20 20 49 46 | END|;. IF|
|000025c0| 20 28 74 68 65 50 72 52 | 65 63 48 64 6c 5e 5e 2e | (thePrR|ecHdl^^.|
|000025d0| 70 72 4a 6f 62 2e 62 4a | 44 6f 63 4c 6f 6f 70 20 |prJob.bJ|DocLoop |
|000025e0| 3d 20 62 53 70 6f 6f 6c | 4c 6f 6f 70 29 20 61 6e |= bSpool|Loop) an|
|000025f0| 64 20 28 50 72 45 72 72 | 6f 72 20 3d 20 6e 6f 45 |d (PrErr|or = noE|
|00002600| 72 72 29 20 54 48 45 4e | 0d 20 20 20 20 20 20 50 |rr) THEN|. P|
|00002610| 72 50 69 63 46 69 6c 65 | 28 74 68 65 50 72 52 65 |rPicFile|(thePrRe|
|00002620| 63 48 64 6c 2c 20 4e 49 | 4c 2c 20 4e 49 4c 2c 20 |cHdl, NI|L, NIL, |
|00002630| 4e 49 4c 2c 20 74 68 65 | 53 74 61 74 75 73 29 3b |NIL, the|Status);|
|00002640| 0d 20 20 20 20 7b 2a 2a | 0d 20 20 20 20 20 20 20 |. {**|. |
|00002650| 20 47 72 61 62 20 74 68 | 65 20 70 72 69 6e 74 69 | Grab th|e printi|
|00002660| 6e 67 20 65 72 72 6f 72 | 20 2d 2d 20 6f 6e 63 65 |ng error| -- once|
|00002670| 20 79 6f 75 20 63 6c 6f | 73 65 20 74 68 65 20 50 | you clo|se the P|
|00002680| 72 69 6e 74 69 6e 67 20 | 4d 61 6e 61 67 65 72 2c |rinting |Manager,|
|00002690| 20 50 72 45 72 72 6f 72 | 20 64 6f 65 73 6e 27 74 | PrError| doesn't|
|000026a0| 20 72 65 74 75 72 6e 0d | 20 20 20 20 20 20 20 20 | return.| |
|000026b0| 61 20 76 61 6c 69 64 20 | 72 65 73 75 6c 74 20 61 |a valid |result a|
|000026c0| 6e 79 6d 6f 72 65 2e 0d | 20 20 20 20 20 2a 2a 7d |nymore..| **}|
|000026d0| 0d 20 20 20 20 50 72 69 | 6e 74 45 72 72 6f 72 20 |. Pri|ntError |
|000026e0| 3a 3d 20 50 72 45 72 72 | 6f 72 3b 0d 20 20 20 20 |:= PrErr|or;. |
|000026f0| 50 72 43 6c 6f 73 65 3b | 0d 20 20 20 20 7b 2a 2a |PrClose;|. {**|
|00002700| 0d 20 20 20 20 20 20 20 | 20 59 6f 75 20 64 6f 20 |. | You do |
|00002710| 6e 6f 74 20 77 61 6e 74 | 20 74 6f 20 72 65 70 6f |not want| to repo|
|00002720| 72 74 20 61 6e 79 20 70 | 72 69 6e 74 69 6e 67 20 |rt any p|rinting |
|00002730| 65 72 72 6f 72 73 20 75 | 6e 74 69 6c 20 79 6f 75 |errors u|ntil you|
|00002740| 20 68 61 76 65 20 66 61 | 6c 6c 65 6e 0d 20 20 20 | have fa|llen. |
|00002750| 20 20 20 20 20 74 68 72 | 6f 75 67 68 20 74 68 65 | thr|ough the|
|00002760| 20 70 72 69 6e 74 69 6e | 67 20 6c 6f 6f 70 2e 20 | printin|g loop. |
|00002770| 54 68 69 73 20 77 69 6c | 6c 20 6d 61 6b 65 20 73 |This wil|l make s|
|00002780| 75 72 65 20 74 68 61 74 | 20 41 4c 4c 20 6f 66 20 |ure that| ALL of |
|00002790| 74 68 65 20 50 72 69 6e | 74 0d 20 20 20 20 20 20 |the Prin|t. |
|000027a0| 20 20 4d 61 6e 61 67 65 | 72 27 73 20 6f 70 65 6e | Manage|r's open|
|000027b0| 20 63 61 6c 6c 73 20 68 | 61 76 65 20 74 68 65 69 | calls h|ave thei|
|000027c0| 72 20 63 6f 72 72 65 73 | 70 6f 6e 64 69 6e 67 20 |r corres|ponding |
|000027d0| 63 6c 6f 73 65 20 63 61 | 6c 6c 73 2c 20 74 68 65 |close ca|lls, the|
|000027e0| 72 65 62 79 0d 20 20 20 | 20 20 20 20 20 65 6e 61 |reby. | ena|
|000027f0| 62 6c 69 6e 67 20 74 68 | 65 20 50 72 69 6e 74 20 |bling th|e Print |
|00002800| 4d 61 6e 61 67 65 72 20 | 74 6f 20 63 6c 6f 73 65 |Manager |to close|
|00002810| 20 70 72 6f 70 65 72 6c | 79 20 61 6e 64 20 74 68 | properl|y and th|
|00002820| 61 74 20 61 6c 6c 20 74 | 65 6d 70 6f 72 61 72 79 |at all t|emporary|
|00002830| 0d 20 20 20 20 20 20 20 | 20 6d 65 6d 6f 72 79 20 |. | memory |
|00002840| 61 6c 6c 6f 63 61 74 69 | 6f 6e 73 20 61 72 65 20 |allocati|ons are |
|00002850| 72 65 6c 65 61 73 65 64 | 2e 0d 20 20 20 20 20 2a |released|.. *|
|00002860| 2a 7d 0d 20 20 20 20 49 | 46 20 28 50 72 69 6e 74 |*}. I|F (Print|
|00002870| 45 72 72 6f 72 20 3c 3e | 20 6e 6f 45 72 72 29 20 |Error <>| noErr) |
|00002880| 54 48 45 4e 0d 20 20 20 | 20 20 20 50 6f 73 74 50 |THEN. | PostP|
|00002890| 72 69 6e 74 69 6e 67 45 | 72 72 6f 72 73 20 28 50 |rintingE|rrors (P|
|000028a0| 72 69 6e 74 45 72 72 6f | 72 29 3b 0d 20 20 20 20 |rintErro|r);. |
|000028b0| 45 4e 44 3b 0d 20 20 49 | 46 20 28 74 68 65 50 72 |END;. I|F (thePr|
|000028c0| 52 65 63 48 64 6c 20 3c | 3e 20 4e 49 4c 29 20 54 |RecHdl <|> NIL) T|
|000028d0| 48 45 4e 20 0d 20 20 20 | 20 44 69 73 70 6f 73 48 |HEN . | DisposH|
|000028e0| 61 6e 64 6c 65 28 48 61 | 6e 64 6c 65 20 28 74 68 |andle(Ha|ndle (th|
|000028f0| 65 50 72 52 65 63 48 64 | 6c 29 29 3b 0d 20 20 49 |ePrRecHd|l));. I|
|00002900| 46 20 28 50 72 69 6e 74 | 69 6e 67 53 74 61 74 75 |F (Print|ingStatu|
|00002910| 73 44 69 61 6c 6f 67 20 | 3c 3e 20 4e 49 4c 29 20 |sDialog |<> NIL) |
|00002920| 54 48 45 4e 20 0d 20 20 | 20 20 44 69 73 70 6f 73 |THEN . | Dispos|
|00002930| 44 69 61 6c 6f 67 28 50 | 72 69 6e 74 69 6e 67 53 |Dialog(P|rintingS|
|00002940| 74 61 74 75 73 44 69 61 | 6c 6f 67 29 3b 0d 20 20 |tatusDia|log);. |
|00002950| 53 65 74 50 6f 72 74 28 | 6f 6c 64 50 6f 72 74 29 |SetPort(|oldPort)|
|00002960| 3b 0d 45 4e 44 3b 20 20 | 7b 2a 2a 20 20 50 72 69 |;.END; |{** Pri|
|00002970| 6e 74 53 74 75 66 66 20 | 20 2a 2a 7d 0d 4d 50 57 |ntStuff | **}.MPW|
|00002980| 20 43 0d 2f 2a 2d 2d 2d | 2d 2d 2d 20 50 72 69 6e | C./*---|--- Prin|
|00002990| 74 53 74 75 66 66 20 2d | 2d 2d 2d 2d 2d 2d 2d 2d |tStuff -|--------|
|000029a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000029b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000029c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000029d0| 2d 2d 2d 2d 2d 2d 2d 2a | 2f 0d 20 2a 2a 0d 20 2a |-------*|/. **. *|
|000029e0| 2a 20 20 20 20 50 72 69 | 6e 74 53 74 75 66 66 20 |* Pri|ntStuff |
|000029f0| 77 69 6c 6c 20 63 61 6c | 6c 20 61 6c 6c 20 6f 66 |will cal|l all of|
|00002a00| 20 74 68 65 20 6e 65 63 | 65 73 73 61 72 79 20 50 | the nec|essary P|
|00002a10| 72 69 6e 74 20 4d 61 6e | 61 67 65 72 20 63 61 6c |rint Man|ager cal|
|00002a20| 6c 73 20 74 6f 20 70 72 | 69 6e 74 0d 20 2a 2a 20 |ls to pr|int. ** |
|00002a30| 20 20 20 61 20 64 6f 63 | 75 6d 65 6e 74 2e 20 49 | a doc|ument. I|
|00002a40| 74 20 63 68 65 63 6b 73 | 20 50 72 45 72 72 6f 72 |t checks| PrError|
|00002a50| 28 29 20 61 66 74 65 72 | 20 65 61 63 68 20 50 72 |() after| each Pr|
|00002a60| 69 6e 74 20 4d 61 6e 61 | 67 65 72 20 63 61 6c 6c |int Mana|ger call|
|00002a70| 2e 20 49 66 20 61 6e 20 | 65 72 72 6f 72 0d 20 2a |. If an |error. *|
|00002a80| 2a 20 20 20 20 69 73 20 | 66 6f 75 6e 64 2c 20 61 |* is |found, a|
|00002a90| 6c 6c 20 6f 66 20 74 68 | 65 20 50 72 69 6e 74 20 |ll of th|e Print |
|00002aa0| 4d 61 6e 61 67 65 72 20 | 6f 70 65 6e 20 63 61 6c |Manager |open cal|
|00002ab0| 6c 73 20 28 69 2e 65 2e | 2c 20 50 72 4f 70 65 6e |ls (i.e.|, PrOpen|
|00002ac0| 2c 20 50 72 4f 70 65 6e | 44 6f 63 2e 2e 2e 29 0d |, PrOpen|Doc...).|
|00002ad0| 20 2a 2a 20 20 20 20 77 | 69 6c 6c 20 68 61 76 65 | ** w|ill have|
|00002ae0| 20 61 20 63 6f 72 72 65 | 73 70 6f 6e 64 69 6e 67 | a corre|sponding|
|00002af0| 20 63 6c 6f 73 65 20 63 | 61 6c 6c 20 62 65 66 6f | close c|all befo|
|00002b00| 72 65 20 74 68 65 20 65 | 72 72 6f 72 20 69 73 20 |re the e|rror is |
|00002b10| 70 6f 73 74 65 64 20 74 | 6f 20 74 68 65 20 75 73 |posted t|o the us|
|00002b20| 65 72 2e 0d 20 2a 2a 20 | 20 20 20 59 6f 75 20 77 |er.. ** | You w|
|00002b30| 61 6e 74 20 74 6f 20 75 | 73 65 20 74 68 69 73 20 |ant to u|se this |
|00002b40| 61 70 70 72 6f 61 63 68 | 20 74 6f 20 6d 61 6b 65 |approach| to make|
|00002b50| 20 73 75 72 65 20 74 68 | 65 20 50 72 69 6e 74 20 | sure th|e Print |
|00002b60| 4d 61 6e 61 67 65 72 20 | 63 6c 6f 73 65 73 20 70 |Manager |closes p|
|00002b70| 72 6f 70 65 72 6c 79 0d | 20 2a 2a 20 20 20 20 61 |roperly.| ** a|
|00002b80| 6e 64 20 61 6c 6c 20 74 | 65 6d 70 6f 72 61 72 79 |nd all t|emporary|
|00002b90| 20 6d 65 6d 6f 72 79 20 | 69 73 20 72 65 6c 65 61 | memory |is relea|
|00002ba0| 73 65 64 2e 0d 20 2a 2a | 2f 0d 76 6f 69 64 20 50 |sed.. **|/.void P|
|00002bb0| 72 69 6e 74 53 74 75 66 | 66 20 28 29 0d 7b 0d 20 |rintStuf|f ().{. |
|00002bc0| 20 47 72 61 66 50 74 72 | 20 20 20 20 20 20 6f 6c | GrafPtr| ol|
|00002bd0| 64 50 6f 72 74 3b 0d 20 | 20 73 68 6f 72 74 20 20 |dPort;. | short |
|00002be0| 20 20 20 20 20 20 63 6f | 70 69 65 73 2c 0d 20 20 | co|pies,. |
|00002bf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 66 69 72 | | fir|
|00002c00| 73 74 50 61 67 65 2c 0d | 20 20 20 20 20 20 20 20 |stPage,.| |
|00002c10| 20 20 20 20 20 20 20 6c | 61 73 74 50 61 67 65 2c | l|astPage,|
|00002c20| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00002c30| 6e 75 6d 62 65 72 4f 66 | 43 6f 70 69 65 73 2c 0d |numberOf|Copies,.|
|00002c40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 70 | | p|
|00002c50| 72 69 6e 74 6d 67 72 73 | 52 65 73 46 69 6c 65 2c |rintmgrs|ResFile,|
|00002c60| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00002c70| 72 65 61 6c 4e 75 6d 62 | 65 72 4f 66 50 61 67 65 |realNumb|erOfPage|
|00002c80| 73 69 6e 44 6f 63 2c 0d | 20 20 20 20 20 20 20 20 |sinDoc,.| |
|00002c90| 20 20 20 20 20 20 20 70 | 61 67 65 4e 75 6d 62 65 | p|ageNumbe|
|00002ca0| 72 2c 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |r,. | |
|00002cb0| 20 20 50 72 69 6e 74 45 | 72 72 6f 72 3b 0d 20 20 | PrintE|rror;. |
|00002cc0| 54 48 50 72 69 6e 74 20 | 20 20 20 20 20 74 68 65 |THPrint | the|
|00002cd0| 50 72 52 65 63 48 64 6c | 3b 0d 20 20 54 50 50 72 |PrRecHdl|;. TPPr|
|00002ce0| 50 6f 72 74 20 20 20 20 | 20 74 68 65 50 72 50 6f |Port | thePrPo|
|00002cf0| 72 74 3b 0d 20 20 54 50 | 72 53 74 61 74 75 73 20 |rt;. TP|rStatus |
|00002d00| 20 20 20 74 68 65 53 74 | 61 74 75 73 3b 0d 20 20 | theSt|atus;. |
|00002d10| 47 65 74 50 6f 72 74 28 | 26 6f 6c 64 50 6f 72 74 |GetPort(|&oldPort|
|00002d20| 29 3b 0d 20 2f 2a 2a 0d | 20 20 20 20 20 55 6e 4c |);. /**.| UnL|
|00002d30| 6f 61 64 54 68 65 57 6f | 72 6c 64 20 77 69 6c 6c |oadTheWo|rld will|
|00002d40| 20 73 77 61 70 20 6f 75 | 74 20 41 4c 4c 20 75 6e | swap ou|t ALL un|
|00002d50| 6e 65 65 64 65 64 20 63 | 6f 64 65 20 73 65 67 6d |needed c|ode segm|
|00002d60| 65 6e 74 73 20 61 6e 64 | 20 64 61 74 61 20 74 68 |ents and| data th|
|00002d70| 61 74 0d 20 20 20 20 20 | 61 72 65 20 4e 4f 54 20 |at. |are NOT |
|00002d80| 72 65 71 75 69 72 65 64 | 20 64 75 72 69 6e 67 20 |required| during |
|00002d90| 70 72 69 6e 74 20 74 69 | 6d 65 2e 20 59 6f 75 72 |print ti|me. Your|
|00002da0| 20 70 72 69 6e 74 20 63 | 6f 64 65 20 6d 75 73 74 | print c|ode must|
|00002db0| 20 62 65 20 61 20 73 65 | 70 61 72 61 74 65 0d 20 | be a se|parate. |
|00002dc0| 20 20 20 20 63 6f 64 65 | 20 73 65 67 6d 65 6e 74 | code| segment|
|00002dd0| 2e 0d 20 20 2a 2a 2f 0d | 20 20 55 6e 4c 6f 61 64 |.. **/.| UnLoad|
|00002de0| 54 68 65 57 6f 72 6c 64 | 20 28 29 3b 0d 20 20 74 |TheWorld| ();. t|
|00002df0| 68 65 50 72 52 65 63 48 | 64 6c 20 3d 20 28 54 48 |hePrRecH|dl = (TH|
|00002e00| 50 72 69 6e 74 29 20 20 | 4e 65 77 48 61 6e 64 6c |Print) |NewHandl|
|00002e10| 65 20 28 73 69 7a 65 6f | 66 20 28 54 50 72 69 6e |e (sizeo|f (TPrin|
|00002e20| 74 29 29 3b 0d 20 2f 2a | 2a 0d 20 20 20 20 20 43 |t));. /*|*. C|
|00002e30| 68 65 63 6b 20 74 6f 20 | 6d 61 6b 65 20 73 75 72 |heck to |make sur|
|00002e40| 65 20 74 68 61 74 20 74 | 68 65 20 6d 65 6d 6f 72 |e that t|he memor|
|00002e50| 79 20 6d 61 6e 61 67 65 | 72 20 64 69 64 20 6e 6f |y manage|r did no|
|00002e60| 74 20 70 72 6f 64 75 63 | 65 20 61 6e 20 65 72 72 |t produc|e an err|
|00002e70| 6f 72 0d 20 20 20 20 20 | 77 68 65 6e 20 69 74 20 |or. |when it |
|00002e80| 61 6c 6c 6f 63 61 74 65 | 64 20 74 68 65 20 70 72 |allocate|d the pr|
|00002e90| 69 6e 74 20 72 65 63 6f | 72 64 20 68 61 6e 64 6c |int reco|rd handl|
|00002ea0| 65 20 61 6e 64 20 6d 61 | 6b 65 20 73 75 72 65 20 |e and ma|ke sure |
|00002eb0| 69 74 20 64 69 64 20 6e | 6f 74 20 70 61 73 73 0d |it did n|ot pass.|
|00002ec0| 20 20 20 20 20 62 61 63 | 6b 20 61 20 6e 69 6c 20 | bac|k a nil |
|00002ed0| 68 61 6e 64 6c 65 2e 0d | 20 20 2a 2a 2f 0d 20 20 |handle..| **/. |
|00002ee0| 69 66 20 28 4d 65 6d 45 | 72 72 6f 72 28 29 20 3d |if (MemE|rror() =|
|00002ef0| 3d 20 6e 6f 45 72 72 20 | 26 26 20 74 68 65 50 72 |= noErr |&& thePr|
|00002f00| 52 65 63 48 64 6c 20 21 | 3d 20 6e 69 6c 29 0d 20 |RecHdl !|= nil). |
|00002f10| 20 20 20 7b 0d 20 20 20 | 20 20 20 50 72 4f 70 65 | {. | PrOpe|
|00002f20| 6e 28 29 3b 0d 20 20 20 | 20 20 20 69 66 20 28 50 |n();. | if (P|
|00002f30| 72 45 72 72 6f 72 28 29 | 20 3d 3d 20 6e 6f 45 72 |rError()| == noEr|
|00002f40| 72 29 0d 20 20 20 20 20 | 20 20 20 7b 0d 20 20 20 |r). | {. |
|00002f50| 20 20 20 20 20 20 2f 2a | 2a 0d 20 20 20 20 20 20 | /*|*. |
|00002f60| 20 20 20 20 20 20 20 20 | 53 61 76 65 20 74 68 65 | |Save the|
|00002f70| 20 63 75 72 72 65 6e 74 | 20 72 65 73 6f 75 72 63 | current| resourc|
|00002f80| 65 20 66 69 6c 65 20 28 | 69 2e 65 2e 20 74 68 65 |e file (|i.e. the|
|00002f90| 20 70 72 69 6e 74 65 72 | 20 64 72 69 76 65 72 27 | printer| driver'|
|00002fa0| 73 29 20 73 6f 0d 20 20 | 20 20 20 20 20 20 20 20 |s) so. | |
|00002fb0| 20 20 20 20 74 68 65 20 | 64 72 69 76 65 72 20 77 | the |driver w|
|00002fc0| 69 6c 6c 20 6e 6f 74 20 | 6c 6f 73 65 20 69 74 73 |ill not |lose its|
|00002fd0| 20 72 65 73 6f 75 72 63 | 65 73 20 75 70 6f 6e 20 | resourc|es upon |
|00002fe0| 72 65 74 75 72 6e 20 66 | 72 6f 6d 20 74 68 65 20 |return f|rom the |
|00002ff0| 70 49 64 6c 65 50 72 6f | 63 2e 0d 20 20 20 20 20 |pIdlePro|c.. |
|00003000| 20 20 20 20 20 2a 2a 2f | 0d 20 20 20 20 20 20 20 | **/|. |
|00003010| 20 20 20 70 72 69 6e 74 | 6d 67 72 73 52 65 73 46 | print|mgrsResF|
|00003020| 69 6c 65 20 3d 20 43 75 | 72 52 65 73 46 69 6c 65 |ile = Cu|rResFile|
|00003030| 28 29 3b 0d 20 20 20 20 | 20 20 20 20 20 20 50 72 |();. | Pr|
|00003040| 69 6e 74 44 65 66 61 75 | 6c 74 28 74 68 65 50 72 |intDefau|lt(thePr|
|00003050| 52 65 63 48 64 6c 29 3b | 0d 20 20 20 20 20 20 20 |RecHdl);|. |
|00003060| 20 20 20 69 66 20 28 50 | 72 45 72 72 6f 72 28 29 | if (P|rError()|
|00003070| 20 3d 3d 20 6e 6f 45 72 | 72 29 0d 20 20 20 20 20 | == noEr|r). |
|00003080| 20 20 20 20 20 20 20 7b | 0d 20 20 20 20 20 20 20 | {|. |
|00003090| 20 20 20 20 20 20 20 69 | 66 20 28 50 72 53 74 6c | i|f (PrStl|
|000030a0| 44 69 61 6c 6f 67 28 74 | 68 65 50 72 52 65 63 48 |Dialog(t|hePrRecH|
|000030b0| 64 6c 29 29 0d 20 20 20 | 20 20 20 20 20 20 20 20 |dl)). | |
|000030c0| 20 20 20 20 20 7b 0d 20 | 20 20 20 20 20 20 20 20 | {. | |
|000030d0| 20 20 20 20 20 20 20 20 | 2f 2a 2a 0d 20 20 20 20 | |/**. |
|000030e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000030f0| 20 44 65 74 65 72 6d 69 | 6e 65 4e 75 6d 62 65 72 | Determi|neNumber|
|00003100| 4f 66 50 61 67 65 73 69 | 6e 44 6f 63 20 64 65 74 |OfPagesi|nDoc det|
|00003110| 65 72 6d 69 6e 65 73 20 | 74 68 65 20 6e 75 6d 62 |ermines |the numb|
|00003120| 65 72 20 6f 66 20 70 61 | 67 65 73 0d 20 20 20 20 |er of pa|ges. |
|00003130| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003140| 20 63 6f 6e 74 61 69 6e | 65 64 20 69 6e 20 74 68 | contain|ed in th|
|00003150| 65 20 64 6f 63 75 6d 65 | 6e 74 20 62 79 20 63 6f |e docume|nt by co|
|00003160| 6d 70 61 72 69 6e 67 20 | 74 68 65 20 73 69 7a 65 |mparing |the size|
|00003170| 20 6f 66 20 74 68 65 20 | 64 6f 63 75 6d 65 6e 74 | of the |document|
|00003180| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00003190| 20 20 20 20 20 20 77 69 | 74 68 20 72 50 61 67 65 | wi|th rPage|
|000031a0| 20 66 72 6f 6d 20 74 68 | 65 20 54 50 72 49 6e 66 | from th|e TPrInf|
|000031b0| 6f 20 72 65 63 6f 72 64 | 20 28 49 4d 20 49 49 2d |o record| (IM II-|
|000031c0| 31 35 30 29 2e 20 49 74 | 20 72 65 74 75 72 6e 73 |150). It| returns|
|000031d0| 20 74 68 65 0d 20 20 20 | 20 20 20 20 20 20 20 20 | the. | |
|000031e0| 20 20 20 20 20 20 20 20 | 20 20 6e 75 6d 62 65 72 | | number|
|000031f0| 20 6f 66 20 70 61 67 65 | 73 20 72 65 71 75 69 72 | of page|s requir|
|00003200| 65 64 20 74 6f 20 70 72 | 69 6e 74 20 74 68 65 20 |ed to pr|int the |
|00003210| 64 6f 63 75 6d 65 6e 74 | 20 66 6f 72 20 74 68 65 |document| for the|
|00003220| 20 09 09 09 20 20 20 20 | 20 20 20 20 20 20 20 20 | ... | |
|00003230| 20 63 75 72 72 65 6e 74 | 6c 79 20 73 65 6c 65 63 | current|ly selec|
|00003240| 74 65 64 20 70 72 69 6e | 74 65 72 2e 0d 20 20 20 |ted prin|ter.. |
|00003250| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2a | | *|
|00003260| 2a 2f 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |*/. | |
|00003270| 20 20 20 20 20 72 65 61 | 6c 4e 75 6d 62 65 72 4f | rea|lNumberO|
|00003280| 66 50 61 67 65 73 69 6e | 44 6f 63 20 3d 20 44 65 |fPagesin|Doc = De|
|00003290| 74 65 72 6d 69 6e 65 4e | 75 6d 62 65 72 4f 66 50 |termineN|umberOfP|
|000032a0| 61 67 65 73 69 6e 44 6f | 63 0d 20 20 20 20 20 20 |agesinDo|c. |
|000032b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000032c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000032d0| 20 20 20 20 20 20 20 28 | 28 2a 2a 74 68 65 50 72 | (|(**thePr|
|000032e0| 52 65 63 48 64 6c 29 2e | 70 72 49 6e 66 6f 2e 72 |RecHdl).|prInfo.r|
|000032f0| 50 61 67 65 29 3b 0d 20 | 20 20 20 20 20 20 20 20 |Page);. | |
|00003300| 20 20 20 20 20 20 20 20 | 20 69 66 20 28 50 72 4a | | if (PrJ|
|00003310| 6f 62 44 69 61 6c 6f 67 | 28 74 68 65 50 72 52 65 |obDialog|(thePrRe|
|00003320| 63 48 64 6c 29 29 20 0d | 20 20 20 20 20 20 20 20 |cHdl)) .| |
|00003330| 20 20 20 20 20 20 20 20 | 20 20 20 20 7b 0d 20 20 | | {. |
|00003340| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003350| 20 20 20 2f 2a 2a 0d 20 | 20 20 20 20 20 20 20 20 | /**. | |
|00003360| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003370| 20 47 65 74 20 74 68 65 | 20 6e 75 6d 62 65 72 20 | Get the| number |
|00003380| 6f 66 20 63 6f 70 69 65 | 73 20 6f 66 20 74 68 65 |of copie|s of the|
|00003390| 20 64 6f 63 75 6d 65 6e | 74 20 74 68 61 74 20 74 | documen|t that t|
|000033a0| 68 65 20 75 73 65 72 20 | 0d 20 20 20 20 20 20 20 |he user |. |
|000033b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000033c0| 20 20 20 77 61 6e 74 73 | 20 70 72 69 6e 74 65 64 | wants| printed|
|000033d0| 20 66 72 6f 6d 20 69 43 | 6f 70 69 65 73 20 6f 66 | from iC|opies of|
|000033e0| 20 74 68 65 20 54 50 72 | 4a 6f 62 20 72 65 63 6f | the TPr|Job reco|
|000033f0| 72 64 20 28 49 4d 20 49 | 49 2d 31 35 31 29 2e 0d |rd (IM I|I-151)..|
|00003400| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003410| 20 20 20 20 20 20 2a 2a | 2f 0d 20 20 20 20 20 20 | **|/. |
|00003420| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003430| 6e 75 6d 62 65 72 4f 66 | 43 6f 70 69 65 73 20 3d |numberOf|Copies =|
|00003440| 20 28 2a 2a 74 68 65 50 | 72 52 65 63 48 64 6c 29 | (**theP|rRecHdl)|
|00003450| 2e 70 72 4a 6f 62 2e 69 | 43 6f 70 69 65 73 3b 0d |.prJob.i|Copies;.|
|00003460| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003470| 20 20 20 20 20 20 20 2f | 2a 2a 0d 20 20 20 20 20 | /|**. |
|00003480| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003490| 20 20 20 20 20 20 47 65 | 74 20 74 68 65 20 66 69 | Ge|t the fi|
|000034a0| 72 73 74 20 61 6e 64 20 | 6c 61 73 74 20 70 61 67 |rst and |last pag|
|000034b0| 65 73 20 6f 66 20 74 68 | 65 20 64 6f 63 75 6d 65 |es of th|e docume|
|000034c0| 6e 74 20 74 68 61 74 0d | 20 20 20 20 20 20 20 20 |nt that.| |
|000034d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000034e0| 20 20 20 77 65 72 65 20 | 72 65 71 75 65 73 74 65 | were |requeste|
|000034f0| 64 20 74 6f 20 62 65 20 | 70 72 69 6e 74 65 64 20 |d to be |printed |
|00003500| 62 79 20 74 68 65 20 75 | 73 65 72 20 66 72 6f 6d |by the u|ser from|
|00003510| 20 69 46 73 74 50 61 67 | 65 0d 20 20 20 20 20 20 | iFstPag|e. |
|00003520| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003530| 20 20 20 20 20 61 6e 64 | 20 69 4c 61 73 74 50 61 | and| iLastPa|
|00003540| 67 65 20 66 72 6f 6d 20 | 74 68 65 20 54 50 72 4a |ge from |the TPrJ|
|00003550| 6f 62 20 72 65 63 6f 72 | 64 20 28 49 4d 20 49 49 |ob recor|d (IM II|
|00003560| 2d 31 35 31 29 2e 0d 20 | 20 20 20 20 20 20 20 20 |-151).. | |
|00003570| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2a | | *|
|00003580| 2a 2f 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |*/. | |
|00003590| 20 20 20 20 20 20 20 20 | 20 66 69 72 73 74 50 61 | | firstPa|
|000035a0| 67 65 20 3d 20 28 2a 2a | 74 68 65 50 72 52 65 63 |ge = (**|thePrRec|
|000035b0| 48 64 6c 29 2e 70 72 4a | 6f 62 2e 69 46 73 74 50 |Hdl).prJ|ob.iFstP|
|000035c0| 61 67 65 3b 0d 20 20 20 | 20 20 20 20 20 20 20 20 |age;. | |
|000035d0| 20 20 20 20 20 20 20 20 | 20 20 20 6c 61 73 74 50 | | lastP|
|000035e0| 61 67 65 20 3d 20 28 2a | 2a 74 68 65 50 72 52 65 |age = (*|*thePrRe|
|000035f0| 63 48 64 6c 29 2e 70 72 | 4a 6f 62 2e 69 4c 73 74 |cHdl).pr|Job.iLst|
|00003600| 50 61 67 65 3b 0d 20 20 | 20 20 20 20 20 20 20 20 |Page;. | |
|00003610| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 2f 2a 2a | | /**|
|00003620| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00003630| 20 20 20 20 20 20 20 20 | 20 20 20 20 50 72 69 6e | | Prin|
|00003640| 74 20 22 61 6c 6c 22 20 | 70 61 67 65 73 20 69 6e |t "all" |pages in|
|00003650| 20 74 68 65 20 70 72 69 | 6e 74 20 6c 6f 6f 70 0d | the pri|nt loop.|
|00003660| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003670| 20 20 20 20 20 20 20 20 | 2a 2a 2f 0d 20 20 20 20 | |**/. |
|00003680| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003690| 20 20 28 2a 2a 74 68 65 | 50 72 52 65 63 48 64 6c | (**the|PrRecHdl|
|000036a0| 29 2e 70 72 4a 6f 62 2e | 69 46 73 74 50 61 67 65 |).prJob.|iFstPage|
|000036b0| 20 3d 20 31 3b 0d 20 20 | 20 20 20 20 20 20 20 20 | = 1;. | |
|000036c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 28 2a 2a 74 | | (**t|
|000036d0| 68 65 50 72 52 65 63 48 | 64 6c 29 2e 70 72 4a 6f |hePrRecH|dl).prJo|
|000036e0| 62 2e 69 4c 73 74 50 61 | 67 65 20 3d 20 39 39 39 |b.iLstPa|ge = 999|
|000036f0| 39 3b 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |9;. | |
|00003700| 20 20 20 20 20 20 20 20 | 20 20 2f 2a 2a 0d 20 20 | | /**. |
|00003710| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003720| 20 20 20 20 20 20 20 20 | 20 44 65 74 65 72 6d 69 | | Determi|
|00003730| 6e 65 20 74 68 65 20 22 | 72 65 61 6c 22 20 6e 75 |ne the "|real" nu|
|00003740| 6d 62 65 72 20 6f 66 20 | 70 61 67 65 73 20 63 6f |mber of |pages co|
|00003750| 6e 74 61 69 6e 65 64 20 | 69 6e 20 74 68 65 20 09 |ntained |in the .|
|00003760| 09 09 20 20 20 20 20 20 | 20 20 20 20 20 64 6f 63 |.. | doc|
|00003770| 75 6d 65 6e 74 2e 20 57 | 69 74 68 6f 75 74 20 74 |ument. W|ithout t|
|00003780| 68 69 73 20 74 65 73 74 | 2c 20 79 6f 75 20 77 6f |his test|, you wo|
|00003790| 75 6c 64 20 70 72 69 6e | 74 20 39 39 39 39 20 70 |uld prin|t 9999 p|
|000037a0| 61 67 65 73 2e 0d 20 20 | 20 20 20 20 20 20 20 20 |ages.. | |
|000037b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2a 2a | | **|
|000037c0| 2f 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |/. | |
|000037d0| 20 20 20 20 20 20 20 20 | 69 66 20 28 72 65 61 6c | |if (real|
|000037e0| 4e 75 6d 62 65 72 4f 66 | 50 61 67 65 73 69 6e 44 |NumberOf|PagesinD|
|000037f0| 6f 63 20 3c 20 6c 61 73 | 74 50 61 67 65 29 20 0d |oc < las|tPage) .|
|00003800| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003810| 20 20 20 20 20 20 20 20 | 6c 61 73 74 50 61 67 65 | |lastPage|
|00003820| 20 3d 20 72 65 61 6c 4e | 75 6d 62 65 72 4f 66 50 | = realN|umberOfP|
|00003830| 61 67 65 73 69 6e 44 6f | 63 3b 0d 20 20 20 20 20 |agesinDo|c;. |
|00003840| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003850| 20 50 72 69 6e 74 69 6e | 67 53 74 61 74 75 73 44 | Printin|gStatusD|
|00003860| 69 61 6c 6f 67 20 3d 20 | 47 65 74 4e 65 77 44 69 |ialog = |GetNewDi|
|00003870| 61 6c 6f 67 28 32 35 37 | 2c 20 6e 69 6c 2c 20 28 |alog(257|, nil, (|
|00003880| 57 69 6e 64 6f 77 50 74 | 72 29 20 2d 31 29 3b 0d |WindowPt|r) -1);.|
|00003890| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000038a0| 20 20 20 20 20 20 20 2f | 2a 2a 0d 20 20 20 20 20 | /|**. |
|000038b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000038c0| 20 20 20 20 20 20 50 72 | 69 6e 74 20 74 68 65 20 | Pr|int the |
|000038d0| 6e 75 6d 62 65 72 20 6f | 66 20 63 6f 70 69 65 73 |number o|f copies|
|000038e0| 20 6f 66 20 74 68 65 20 | 64 6f 63 75 6d 65 6e 74 | of the |document|
|000038f0| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00003900| 20 20 20 20 20 20 20 20 | 20 20 20 20 72 65 71 75 | | requ|
|00003910| 65 73 74 65 64 20 62 79 | 20 74 68 65 20 75 73 65 |ested by| the use|
|00003920| 72 20 66 72 6f 6d 20 74 | 68 65 20 50 72 69 6e 74 |r from t|he Print|
|00003930| 20 4a 6f 62 20 44 69 61 | 6c 6f 67 2e 0d 20 20 20 | Job Dia|log.. |
|00003940| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003950| 20 20 20 20 20 2a 2a 2f | 0d 20 20 20 20 20 20 20 | **/|. |
|00003960| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 66 | | f|
|00003970| 6f 72 20 28 63 6f 70 69 | 65 73 20 3d 20 31 3b 20 |or (copi|es = 1; |
|00003980| 63 6f 70 69 65 73 20 3c | 3d 20 6e 75 6d 62 65 72 |copies <|= number|
|00003990| 4f 66 43 6f 70 69 65 73 | 3b 20 63 6f 70 69 65 73 |OfCopies|; copies|
|000039a0| 2b 2b 29 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |++). | |
|000039b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 7b 0d 20 20 | | {. |
|000039c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000039d0| 20 20 20 20 20 20 20 2f | 2a 2a 0d 20 20 20 20 20 | /|**. |
|000039e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000039f0| 20 20 20 20 20 20 20 20 | 49 6e 73 74 61 6c 6c 20 | |Install |
|00003a00| 61 20 70 6f 69 6e 74 65 | 72 20 74 6f 20 79 6f 75 |a pointe|r to you|
|00003a10| 72 20 70 49 64 6c 65 20 | 70 72 6f 63 20 69 6e 20 |r pIdle |proc in |
|00003a20| 6d 79 20 70 72 69 6e 74 | 20 72 65 63 6f 72 64 2e |my print| record.|
|00003a30| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00003a40| 20 20 20 20 20 20 20 20 | 20 20 20 2a 2a 2f 0d 20 | | **/. |
|00003a50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003a60| 20 20 20 20 20 20 20 20 | 20 28 2a 2a 74 68 65 50 | | (**theP|
|00003a70| 72 52 65 63 48 64 6c 29 | 2e 70 72 4a 6f 62 2e 70 |rRecHdl)|.prJob.p|
|00003a80| 49 64 6c 65 50 72 6f 63 | 20 3d 20 63 68 65 63 6b |IdleProc| = check|
|00003a90| 4d 79 50 72 69 6e 74 44 | 69 61 6c 6f 67 42 75 74 |MyPrintD|ialogBut|
|00003aa0| 74 6f 6e 3b 0d 20 20 20 | 20 20 20 20 20 20 20 20 |ton;. | |
|00003ab0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2f 2a | | /*|
|00003ac0| 2a 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |*. | |
|00003ad0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 52 | | R|
|00003ae0| 65 73 74 6f 72 65 20 74 | 68 65 20 72 65 73 6f 75 |estore t|he resou|
|00003af0| 72 63 65 20 66 69 6c 65 | 20 74 6f 20 74 68 65 20 |rce file| to the |
|00003b00| 70 72 69 6e 74 65 72 20 | 64 72 69 76 65 72 27 73 |printer |driver's|
|00003b10| 2e 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|00003b20| 20 20 20 20 20 20 20 20 | 20 20 20 20 2a 2a 2f 0d | | **/.|
|00003b30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003b40| 20 20 20 20 20 20 20 20 | 20 20 55 73 65 52 65 73 | | UseRes|
|00003b50| 46 69 6c 65 28 70 72 69 | 6e 74 6d 67 72 73 52 65 |File(pri|ntmgrsRe|
|00003b60| 73 46 69 6c 65 29 3b 0d | 20 20 20 20 20 20 20 20 |sFile);.| |
|00003b70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003b80| 20 20 74 68 65 50 72 50 | 6f 72 74 20 3d 20 50 72 | thePrP|ort = Pr|
|00003b90| 4f 70 65 6e 44 6f 63 28 | 74 68 65 50 72 52 65 63 |OpenDoc(|thePrRec|
|00003ba0| 48 64 6c 2c 20 6e 69 6c | 2c 20 6e 69 6c 29 3b 0d |Hdl, nil|, nil);.|
|00003bb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003bc0| 20 20 20 20 20 20 20 20 | 20 20 69 66 20 28 50 72 | | if (Pr|
|00003bd0| 45 72 72 6f 72 28 29 20 | 3d 3d 20 6e 6f 45 72 72 |Error() |== noErr|
|00003be0| 29 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |). | |
|00003bf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 7b 0d | | {.|
|00003c00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003c10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 2f 2a 2a | | /**|
|00003c20| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00003c30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003c40| 20 20 50 72 69 6e 74 20 | 74 68 65 20 72 61 6e 67 | Print |the rang|
|00003c50| 65 20 6f 66 20 70 61 67 | 65 73 20 6f 66 20 74 68 |e of pag|es of th|
|00003c60| 65 20 64 6f 63 75 6d 65 | 6e 74 20 0d 20 20 20 20 |e docume|nt . |
|00003c70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003c80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 72 65 71 | | req|
|00003c90| 75 65 73 74 65 64 20 62 | 79 20 74 68 65 20 75 73 |uested b|y the us|
|00003ca0| 65 72 20 66 72 6f 6d 20 | 74 68 65 20 50 72 69 6e |er from |the Prin|
|00003cb0| 74 20 4a 6f 62 20 44 69 | 61 6c 6f 67 2e 0d 20 20 |t Job Di|alog.. |
|00003cc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003cd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 2a 2a 2f 0d | | **/.|
|00003ce0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003cf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 70 61 | | pa|
|00003d00| 67 65 4e 75 6d 62 65 72 | 20 3d 20 66 69 72 73 74 |geNumber| = first|
|00003d10| 50 61 67 65 3b 0d 20 20 | 20 20 20 20 20 20 20 20 |Page;. | |
|00003d20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003d30| 20 20 20 20 77 68 69 6c | 65 20 28 70 61 67 65 4e | whil|e (pageN|
|00003d40| 75 6d 62 65 72 20 3c 3d | 20 6c 61 73 74 50 61 67 |umber <=| lastPag|
|00003d50| 65 20 26 26 20 50 72 45 | 72 72 6f 72 28 29 20 3d |e && PrE|rror() =|
|00003d60| 3d 20 6e 6f 45 72 72 29 | 0d 20 20 20 20 20 20 20 |= noErr)|. |
|00003d70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003d80| 20 20 20 20 20 20 20 20 | 20 7b 0d 20 20 20 20 20 | | {. |
|00003d90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003da0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 0d 09 09 | | ...|
|00003db0| 09 09 20 20 20 20 20 2f | 2a 2a 0d 09 09 09 09 09 |.. /|**......|
|00003dc0| 20 20 20 49 66 20 77 65 | 27 76 65 20 63 72 6f 73 | If we|'ve cros|
|00003dd0| 73 65 64 20 61 20 31 32 | 38 2d 70 61 67 65 20 62 |sed a 12|8-page b|
|00003de0| 6f 75 6e 64 61 72 79 2c | 0d 09 09 09 09 09 20 20 |oundary,|...... |
|00003df0| 20 63 6c 6f 73 65 20 74 | 68 65 20 63 75 72 72 65 | close t|he curre|
|00003e00| 6e 74 20 70 72 69 6e 74 | 20 66 69 6c 65 2c 20 73 |nt print| file, s|
|00003e10| 65 6e 64 20 69 74 0d 09 | 09 09 09 09 20 20 20 74 |end it..|.... t|
|00003e20| 6f 20 74 68 65 20 70 72 | 69 6e 74 65 72 20 69 66 |o the pr|inter if|
|00003e30| 20 6e 65 63 65 73 73 61 | 72 79 2c 20 61 6e 64 20 | necessa|ry, and |
|00003e40| 6f 70 65 6e 20 61 0d 09 | 09 09 09 09 20 20 20 6e |open a..|.... n|
|00003e50| 65 77 20 64 6f 63 75 6d | 65 6e 74 2e 0d 09 09 09 |ew docum|ent.....|
|00003e60| 09 20 20 20 20 20 2a 2a | 2f 0d 09 09 09 09 20 20 |. **|/..... |
|00003e70| 20 20 20 0d 09 09 09 09 | 20 20 20 20 20 69 66 20 | .....| if |
|00003e80| 28 28 70 61 67 65 4e 75 | 6d 62 65 72 20 2d 20 66 |((pageNu|mber - f|
|00003e90| 69 72 73 74 50 61 67 65 | 29 20 25 20 69 50 46 4d |irstPage|) % iPFM|
|00003ea0| 61 78 50 67 73 20 3d 3d | 20 30 29 0d 09 09 09 09 |axPgs ==| 0).....|
|00003eb0| 20 20 20 20 20 20 20 7b | 0d 09 09 09 09 20 20 20 | {|..... |
|00003ec0| 20 20 20 20 20 20 69 66 | 20 28 70 61 67 65 4e 75 | if| (pageNu|
|00003ed0| 6d 62 65 72 20 21 3d 20 | 66 69 72 73 74 50 61 67 |mber != |firstPag|
|00003ee0| 65 29 0d 09 09 09 09 20 | 20 20 20 20 20 20 20 20 |e)..... | |
|00003ef0| 20 20 7b 0d 09 09 09 09 | 20 20 20 20 20 20 20 20 | {.....| |
|00003f00| 20 20 20 20 20 50 72 43 | 6c 6f 73 65 44 6f 63 28 | PrC|loseDoc(|
|00003f10| 74 68 65 50 72 50 6f 72 | 74 29 3b 0d 09 09 09 09 |thePrPor|t);.....|
|00003f20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 69 66 20 | | if |
|00003f30| 28 28 28 2a 2a 74 68 65 | 50 72 52 65 63 48 64 6c |(((**the|PrRecHdl|
|00003f40| 29 2e 70 72 4a 6f 62 2e | 62 4a 44 6f 63 4c 6f 6f |).prJob.|bJDocLoo|
|00003f50| 70 20 3d 3d 0d 20 20 20 | 20 20 20 20 20 20 20 20 |p ==. | |
|00003f60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003f70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003f80| 20 20 62 53 70 6f 6f 6c | 4c 6f 6f 70 29 20 26 26 | bSpool|Loop) &&|
|00003f90| 20 28 50 72 45 72 72 6f | 72 28 29 20 3d 3d 20 6e | (PrErro|r() == n|
|00003fa0| 6f 45 72 72 29 29 0d 20 | 20 20 20 20 20 20 20 20 |oErr)). | |
|00003fb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003fc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003fd0| 20 20 20 20 50 72 50 69 | 63 46 69 6c 65 28 74 68 | PrPi|cFile(th|
|00003fe0| 65 50 72 52 65 63 48 64 | 6c 2c 20 6e 69 6c 2c 20 |ePrRecHd|l, nil, |
|00003ff0| 6e 69 6c 2c 20 6e 69 6c | 2c 0d 20 20 20 20 20 20 |nil, nil|,. |
|00004000| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004010| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004020| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004030| 20 26 74 68 65 53 74 61 | 74 75 73 29 3b 0d 09 09 | &theSta|tus);...|
|00004040| 09 09 20 20 20 20 20 20 | 20 20 20 20 20 20 20 74 |.. | t|
|00004050| 68 65 50 72 50 6f 72 74 | 20 3d 20 50 72 4f 70 65 |hePrPort| = PrOpe|
|00004060| 6e 44 6f 63 28 74 68 65 | 50 72 52 65 63 48 64 6c |nDoc(the|PrRecHdl|
|00004070| 2c 20 6e 69 6c 2c 0d 20 | 20 20 20 20 20 20 20 20 |, nil,. | |
|00004080| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004090| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000040a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000040b0| 20 20 20 20 20 20 20 6e | 69 6c 29 3b 0d 20 20 20 | n|il);. |
|000040c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000040d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000040e0| 20 20 20 20 20 20 7d 0d | 20 20 20 20 20 20 20 20 | }.| |
|000040f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004100| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 7d 09 0d | | }..|
|00004110| 09 09 09 09 20 20 20 20 | 20 50 72 4f 70 65 6e 50 |.... | PrOpenP|
|00004120| 61 67 65 28 74 68 65 50 | 72 50 6f 72 74 2c 20 6e |age(theP|rPort, n|
|00004130| 69 6c 29 3b 0d 20 20 20 | 20 20 20 20 20 20 20 20 |il);. | |
|00004140| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004150| 20 20 20 20 20 20 20 69 | 66 20 28 50 72 45 72 72 | i|f (PrErr|
|00004160| 6f 72 28 29 20 3d 3d 20 | 6e 6f 45 72 72 29 20 0d |or() == |noErr) .|
|00004170| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004180| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004190| 20 20 20 20 7b 0d 20 20 | 20 20 20 20 20 20 20 20 | {. | |
|000041a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000041b0| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2a 2a 0d 20 | | /**. |
|000041c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000041d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000041e0| 20 20 20 20 20 20 20 20 | 72 50 61 67 65 20 28 49 | |rPage (I|
|000041f0| 4d 20 49 49 2d 31 35 30 | 29 20 69 73 20 74 68 65 |M II-150|) is the|
|00004200| 20 70 72 69 6e 74 61 62 | 6c 65 20 61 72 65 61 0d | printab|le area.|
|00004210| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004220| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004230| 20 20 20 20 20 20 20 20 | 20 66 6f 72 20 74 68 65 | | for the|
|00004240| 20 63 75 72 72 65 6e 74 | 6c 79 20 73 65 6c 65 63 | current|ly selec|
|00004250| 74 65 64 20 70 72 69 6e | 74 65 72 2e 20 42 79 20 |ted prin|ter. By |
|00004260| 09 09 09 09 09 20 20 20 | 20 20 70 61 73 73 69 6e |..... | passin|
|00004270| 67 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 70 6f |g the cu|rrent po|
|00004280| 72 74 20 74 6f 20 74 68 | 65 20 64 72 61 77 20 09 |rt to th|e draw .|
|00004290| 09 09 09 09 09 20 20 20 | 20 20 72 6f 75 74 69 6e |..... | routin|
|000042a0| 65 2c 20 65 6e 61 62 6c | 65 73 20 79 6f 75 72 20 |e, enabl|es your |
|000042b0| 61 70 70 20 74 6f 20 75 | 73 65 20 74 68 65 20 73 |app to u|se the s|
|000042c0| 61 6d 65 20 09 09 09 09 | 09 20 20 20 20 20 72 6f |ame ....|. ro|
|000042d0| 75 74 69 6e 65 20 74 6f | 20 64 72 61 77 20 74 6f |utine to| draw to|
|000042e0| 20 74 68 65 20 73 63 72 | 65 65 6e 20 61 6e 64 20 | the scr|een and |
|000042f0| 74 68 65 20 09 09 09 09 | 09 20 20 20 20 20 70 72 |the ....|. pr|
|00004300| 69 6e 74 65 72 27 73 20 | 47 72 61 66 50 6f 72 74 |inter's |GrafPort|
|00004310| 2e 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|00004320| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004330| 20 20 20 20 20 20 20 20 | 2a 2a 2f 0d 20 20 20 20 | |**/. |
|00004340| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004350| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004360| 20 20 44 72 61 77 53 74 | 75 66 66 20 28 28 2a 2a | DrawSt|uff ((**|
|00004370| 74 68 65 50 72 52 65 63 | 48 64 6c 29 2e 70 72 49 |thePrRec|Hdl).prI|
|00004380| 6e 66 6f 2e 72 50 61 67 | 65 2c 20 0d 20 20 20 20 |nfo.rPag|e, . |
|00004390| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000043a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000043b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 28 47 72 | | (Gr|
|000043c0| 61 66 50 74 72 29 20 74 | 68 65 50 72 50 6f 72 74 |afPtr) t|hePrPort|
|000043d0| 2c 20 70 61 67 65 4e 75 | 6d 62 65 72 29 3b 0d 20 |, pageNu|mber);. |
|000043e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000043f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004400| 20 20 20 7d 0d 20 20 20 | 20 20 20 20 20 20 20 20 | }. | |
|00004410| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004420| 20 20 20 20 20 20 20 50 | 72 43 6c 6f 73 65 50 61 | P|rClosePa|
|00004430| 67 65 28 74 68 65 50 72 | 50 6f 72 74 29 3b 0d 20 |ge(thePr|Port);. |
|00004440| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004450| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004460| 20 70 61 67 65 4e 75 6d | 62 65 72 2b 2b 3b 0d 20 | pageNum|ber++;. |
|00004470| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004480| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7d | | }|
|00004490| 20 20 2f 2a 2a 20 20 45 | 6e 64 20 70 61 67 65 4e | /** E|nd pageN|
|000044a0| 75 6d 62 65 72 20 6c 6f | 6f 70 20 20 2a 2a 2f 0d |umber lo|op **/.|
|000044b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000044c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 7d 0d 20 20 | | }. |
|000044d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000044e0| 20 20 20 20 20 20 20 20 | 50 72 43 6c 6f 73 65 44 | |PrCloseD|
|000044f0| 6f 63 28 74 68 65 50 72 | 50 6f 72 74 29 3b 0d 20 |oc(thePr|Port);. |
|00004500| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004510| 20 20 20 20 20 20 20 7d | 20 2f 2a 2a 20 20 45 6e | }| /** En|
|00004520| 64 20 63 6f 70 69 65 73 | 20 6c 6f 6f 70 20 20 2a |d copies| loop *|
|00004530| 2a 2f 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |*/. | |
|00004540| 20 20 20 20 20 20 20 7d | 0d 20 20 20 20 20 20 20 | }|. |
|00004550| 20 20 20 20 20 20 20 20 | 20 20 20 20 2f 2a 2a 0d | | /**.|
|00004560| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004570| 20 20 20 20 20 20 20 54 | 68 65 20 70 72 69 6e 74 | T|he print|
|00004580| 69 6e 67 20 6a 6f 62 20 | 69 73 20 62 65 69 6e 67 |ing job |is being|
|00004590| 20 63 61 6e 63 65 6c 65 | 64 20 62 79 20 74 68 65 | cancele|d by the|
|000045a0| 20 72 65 71 75 65 73 74 | 20 6f 66 20 74 68 65 0d | request| of the.|
|000045b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000045c0| 20 20 20 20 20 20 20 75 | 73 65 72 20 66 72 6f 6d | u|ser from|
|000045d0| 20 74 68 65 20 50 72 69 | 6e 74 20 53 74 79 6c 65 | the Pri|nt Style|
|000045e0| 20 44 69 61 6c 6f 67 20 | 6f 72 20 74 68 65 20 50 | Dialog |or the P|
|000045f0| 72 69 6e 74 20 4a 6f 62 | 20 44 69 61 6c 6f 67 2e |rint Job| Dialog.|
|00004600| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004610| 20 20 20 20 20 20 20 20 | 50 72 45 72 72 6f 72 20 | |PrError |
|00004620| 77 69 6c 6c 20 62 65 20 | 73 65 74 20 74 6f 20 50 |will be |set to P|
|00004630| 72 41 62 6f 72 74 20 74 | 6f 20 74 65 6c 6c 20 74 |rAbort t|o tell t|
|00004640| 68 65 20 50 72 69 6e 74 | 20 4d 61 6e 61 67 65 72 |he Print| Manager|
|00004650| 20 74 6f 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 | to. | |
|00004660| 20 20 20 20 20 20 20 20 | 20 20 20 61 62 6f 72 74 | | abort|
|00004670| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 70 72 69 | the cur|rent pri|
|00004680| 6e 74 69 6e 67 20 6a 6f | 62 2e 0d 20 20 20 20 20 |nting jo|b.. |
|00004690| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2a | | *|
|000046a0| 2a 2f 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |*/. | |
|000046b0| 20 20 20 20 20 65 6c 73 | 65 0d 20 20 20 20 20 20 | els|e. |
|000046c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 50 72 | | Pr|
|000046d0| 53 65 74 45 72 72 6f 72 | 20 28 69 50 72 41 62 6f |SetError| (iPrAbo|
|000046e0| 72 74 29 3b 20 20 20 2f | 2a 2a 20 20 63 61 6e 63 |rt); /|** canc|
|000046f0| 65 6c 20 66 72 6f 6d 20 | 74 68 65 20 6a 6f 62 20 |el from |the job |
|00004700| 64 69 61 6c 6f 67 20 20 | 2a 2a 2f 0d 20 20 20 20 |dialog |**/. |
|00004710| 20 20 20 20 20 20 20 20 | 20 20 20 20 7d 0d 20 20 | | }. |
|00004720| 20 20 20 20 20 20 20 20 | 20 20 20 20 65 6c 73 65 | | else|
|00004730| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004740| 20 50 72 53 65 74 45 72 | 72 6f 72 20 28 69 50 72 | PrSetEr|ror (iPr|
|00004750| 41 62 6f 72 74 29 3b 20 | 20 20 2f 2a 2a 20 20 63 |Abort); | /** c|
|00004760| 61 6e 63 65 6c 20 66 72 | 6f 6d 20 74 68 65 20 73 |ancel fr|om the s|
|00004770| 74 79 6c 65 20 64 69 61 | 6c 6f 67 20 20 2a 2a 2f |tyle dia|log **/|
|00004780| 20 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 7d 0d | . | }.|
|00004790| 20 20 20 20 20 20 20 20 | 7d 0d 20 20 20 20 20 20 | |}. |
|000047a0| 69 66 20 28 28 28 2a 2a | 74 68 65 50 72 52 65 63 |if (((**|thePrRec|
|000047b0| 48 64 6c 29 2e 70 72 4a | 6f 62 2e 62 4a 44 6f 63 |Hdl).prJ|ob.bJDoc|
|000047c0| 4c 6f 6f 70 20 3d 3d 20 | 62 53 70 6f 6f 6c 4c 6f |Loop == |bSpoolLo|
|000047d0| 6f 70 29 20 26 26 20 28 | 50 72 45 72 72 6f 72 28 |op) && (|PrError(|
|000047e0| 29 20 3d 3d 20 6e 6f 45 | 72 72 29 29 0d 20 20 20 |) == noE|rr)). |
|000047f0| 20 20 20 20 20 50 72 50 | 69 63 46 69 6c 65 28 74 | PrP|icFile(t|
|00004800| 68 65 50 72 52 65 63 48 | 64 6c 2c 20 6e 69 6c 2c |hePrRecH|dl, nil,|
|00004810| 20 6e 69 6c 2c 20 6e 69 | 6c 2c 20 26 74 68 65 53 | nil, ni|l, &theS|
|00004820| 74 61 74 75 73 29 3b 0d | 20 20 20 20 20 20 20 2f |tatus);.| /|
|00004830| 2a 2a 0d 20 20 20 20 20 | 20 20 20 20 20 20 47 72 |**. | Gr|
|00004840| 61 62 20 74 68 65 20 70 | 72 69 6e 74 69 6e 67 20 |ab the p|rinting |
|00004850| 65 72 72 6f 72 20 2d 2d | 20 6f 6e 63 65 20 79 6f |error --| once yo|
|00004860| 75 20 63 6c 6f 73 65 20 | 74 68 65 20 50 72 69 6e |u close |the Prin|
|00004870| 74 69 6e 67 20 4d 61 6e | 61 67 65 72 2c 20 50 72 |ting Man|ager, Pr|
|00004880| 45 72 72 6f 72 20 64 6f | 65 73 6e 27 74 0d 09 20 |Error do|esn't.. |
|00004890| 20 20 72 65 74 75 72 6e | 61 20 76 61 6c 69 64 20 | return|a valid |
|000048a0| 72 65 73 75 6c 74 20 61 | 6e 79 6d 6f 72 65 2e 20 |result a|nymore. |
|000048b0| 0d 20 20 20 20 20 20 20 | 2a 2a 2f 0d 20 20 20 20 |. |**/. |
|000048c0| 20 20 50 72 69 6e 74 45 | 72 72 6f 72 20 3d 20 50 | PrintE|rror = P|
|000048d0| 72 45 72 72 6f 72 28 29 | 3b 0d 20 20 20 20 20 20 |rError()|;. |
|000048e0| 50 72 43 6c 6f 73 65 28 | 29 3b 0d 20 20 20 20 20 |PrClose(|);. |
|000048f0| 20 20 2f 2a 2a 0d 20 20 | 20 20 20 20 20 20 20 20 | /**. | |
|00004900| 20 59 6f 75 20 64 6f 20 | 6e 6f 74 20 77 61 6e 74 | You do |not want|
|00004910| 20 74 6f 20 72 65 70 6f | 72 74 20 61 6e 79 20 70 | to repo|rt any p|
|00004920| 72 69 6e 74 69 6e 67 20 | 65 72 72 6f 72 73 20 75 |rinting |errors u|
|00004930| 6e 74 69 6c 20 79 6f 75 | 20 68 61 76 65 20 66 61 |ntil you| have fa|
|00004940| 6c 6c 65 6e 0d 20 20 20 | 20 20 20 20 20 20 20 20 |llen. | |
|00004950| 74 68 72 6f 75 67 68 20 | 74 68 65 20 70 72 69 6e |through |the prin|
|00004960| 74 69 6e 67 20 6c 6f 6f | 70 2e 20 54 68 69 73 20 |ting loo|p. This |
|00004970| 77 69 6c 6c 20 6d 61 6b | 65 20 73 75 72 65 20 74 |will mak|e sure t|
|00004980| 68 61 74 20 41 4c 4c 20 | 6f 66 20 74 68 65 20 50 |hat ALL |of the P|
|00004990| 72 69 6e 74 0d 20 20 20 | 20 20 20 20 20 20 20 20 |rint. | |
|000049a0| 4d 61 6e 61 67 65 72 27 | 73 20 6f 70 65 6e 20 63 |Manager'|s open c|
|000049b0| 61 6c 6c 73 20 68 61 76 | 65 20 74 68 65 69 72 20 |alls hav|e their |
|000049c0| 63 6f 72 72 65 73 70 6f | 6e 64 69 6e 67 20 63 6c |correspo|nding cl|
|000049d0| 6f 73 65 20 63 61 6c 6c | 73 2c 20 74 68 65 72 65 |ose call|s, there|
|000049e0| 62 79 0d 20 20 20 20 20 | 20 20 20 20 20 20 65 6e |by. | en|
|000049f0| 61 62 6c 69 6e 67 20 74 | 68 65 20 50 72 69 6e 74 |abling t|he Print|
|00004a00| 20 4d 61 6e 61 67 65 72 | 20 74 6f 20 63 6c 6f 73 | Manager| to clos|
|00004a10| 65 20 70 72 6f 70 65 72 | 6c 79 20 61 6e 64 20 74 |e proper|ly and t|
|00004a20| 68 61 74 20 61 6c 6c 20 | 74 65 6d 70 6f 72 61 72 |hat all |temporar|
|00004a30| 79 0d 20 20 20 20 20 20 | 20 20 20 20 20 6d 65 6d |y. | mem|
|00004a40| 6f 72 79 20 61 6c 6c 6f | 63 61 74 69 6f 6e 73 20 |ory allo|cations |
|00004a50| 61 72 65 20 72 65 6c 65 | 61 73 65 64 2e 0d 20 20 |are rele|ased.. |
|00004a60| 20 20 20 20 20 20 2a 2a | 2f 0d 20 20 20 20 20 20 | **|/. |
|00004a70| 69 66 20 28 50 72 69 6e | 74 45 72 72 6f 72 20 21 |if (Prin|tError !|
|00004a80| 3d 20 6e 6f 45 72 72 29 | 20 0d 20 20 20 20 20 20 |= noErr)| . |
|00004a90| 20 20 50 6f 73 74 50 72 | 69 6e 74 69 6e 67 45 72 | PostPr|intingEr|
|00004aa0| 72 6f 72 73 20 28 50 72 | 69 6e 74 45 72 72 6f 72 |rors (Pr|intError|
|00004ab0| 29 3b 0d 20 20 20 20 7d | 0d 20 20 69 66 20 28 74 |);. }|. if (t|
|00004ac0| 68 65 50 72 52 65 63 48 | 64 6c 20 21 3d 20 6e 69 |hePrRecH|dl != ni|
|00004ad0| 6c 29 0d 20 20 20 20 44 | 69 73 70 6f 73 48 61 6e |l). D|isposHan|
|00004ae0| 64 6c 65 28 28 48 61 6e | 64 6c 65 29 20 74 68 65 |dle((Han|dle) the|
|00004af0| 50 72 52 65 63 48 64 6c | 29 3b 0d 20 20 69 66 20 |PrRecHdl|);. if |
|00004b00| 28 50 72 69 6e 74 69 6e | 67 53 74 61 74 75 73 44 |(Printin|gStatusD|
|00004b10| 69 61 6c 6f 67 20 21 3d | 20 6e 69 6c 29 0d 20 20 |ialog !=| nil). |
|00004b20| 20 20 44 69 73 70 6f 73 | 44 69 61 6c 6f 67 28 50 | Dispos|Dialog(P|
|00004b30| 72 69 6e 74 69 6e 67 53 | 74 61 74 75 73 44 69 61 |rintingS|tatusDia|
|00004b40| 6c 6f 67 29 3b 0d 20 20 | 53 65 74 50 6f 72 74 28 |log);. |SetPort(|
|00004b50| 6f 6c 64 50 6f 72 74 29 | 3b 0d 7d 20 20 2f 2a 2a |oldPort)|;.} /**|
|00004b60| 20 50 72 69 6e 74 53 74 | 75 66 66 20 2a 2a 2f 0d | PrintSt|uff **/.|
|00004b70| 43 68 65 63 6b 69 6e 67 | 20 41 6e 64 20 48 61 6e |Checking| And Han|
|00004b80| 64 6c 69 6e 67 20 50 72 | 69 6e 74 69 6e 67 20 45 |dling Pr|inting E|
|00004b90| 72 72 6f 72 73 0d 41 6e | 20 61 70 70 6c 69 63 61 |rrors.An| applica|
|00004ba0| 74 69 6f 6e 20 73 68 6f | 75 6c 64 20 61 6c 77 61 |tion sho|uld alwa|
|00004bb0| 79 73 20 63 68 65 63 6b | 20 66 6f 72 20 65 72 72 |ys check| for err|
|00004bc0| 6f 72 20 63 6f 6e 64 69 | 74 69 6f 6e 73 20 77 68 |or condi|tions wh|
|00004bd0| 69 6c 65 20 70 72 69 6e | 74 69 6e 67 20 62 79 20 |ile prin|ting by |
|00004be0| 63 61 6c 6c 69 6e 67 20 | 50 72 45 72 72 6f 72 2e |calling |PrError.|
|00004bf0| 20 20 50 72 45 72 72 6f | 72 20 72 65 74 75 72 6e | PrErro|r return|
|00004c00| 73 20 65 72 72 6f 72 73 | 20 66 72 6f 6d 20 74 68 |s errors| from th|
|00004c10| 65 20 50 72 69 6e 74 69 | 6e 67 20 4d 61 6e 61 67 |e Printi|ng Manag|
|00004c20| 65 72 20 28 61 6e 64 20 | 73 6f 6d 65 20 41 70 70 |er (and |some App|
|00004c30| 6c 65 54 61 6c 6b 20 61 | 6e 64 20 4f 53 20 65 72 |leTalk a|nd OS er|
|00004c40| 72 6f 72 73 29 20 74 68 | 61 74 20 6f 63 63 75 72 |rors) th|at occur|
|00004c50| 20 64 75 72 69 6e 67 20 | 70 72 69 6e 74 69 6e 67 | during |printing|
|00004c60| 2e 0d 41 73 20 74 68 65 | 20 65 78 61 6d 70 6c 65 |..As the| example|
|00004c70| 20 63 6f 64 65 20 64 65 | 6d 6f 6e 73 74 72 61 74 | code de|monstrat|
|00004c80| 65 73 2c 20 61 6e 20 61 | 70 70 6c 69 63 61 74 69 |es, an a|pplicati|
|00004c90| 6f 6e 20 73 68 6f 75 6c | 64 20 63 61 6c 6c 20 50 |on shoul|d call P|
|00004ca0| 72 45 72 72 6f 72 20 61 | 66 74 65 72 20 65 61 63 |rError a|fter eac|
|00004cb0| 68 20 63 61 6c 6c 20 74 | 6f 20 61 20 50 72 69 6e |h call t|o a Prin|
|00004cc0| 74 69 6e 67 20 4d 61 6e | 61 67 65 72 20 66 75 6e |ting Man|ager fun|
|00004cd0| 63 74 69 6f 6e 20 6f 72 | 20 70 72 6f 63 65 64 75 |ction or| procedu|
|00004ce0| 72 65 2e 20 20 42 79 20 | 63 6f 6e 73 69 73 74 65 |re. By |consiste|
|00004cf0| 6e 74 6c 79 20 63 68 65 | 63 6b 69 6e 67 20 50 72 |ntly che|cking Pr|
|00004d00| 45 72 72 6f 72 20 61 66 | 74 65 72 20 65 61 63 68 |Error af|ter each|
|00004d10| 20 63 61 6c 6c 2c 20 74 | 68 65 20 61 70 70 6c 69 | call, t|he appli|
|00004d20| 63 61 74 69 6f 6e 20 69 | 73 20 61 62 6c 65 20 74 |cation i|s able t|
|00004d30| 6f 20 63 61 74 63 68 20 | 61 6e 79 20 65 72 72 6f |o catch |any erro|
|00004d40| 72 73 20 63 72 65 61 74 | 65 64 20 61 74 20 70 72 |rs creat|ed at pr|
|00004d50| 69 6e 74 20 74 69 6d 65 | 20 61 6e 64 20 72 65 70 |int time| and rep|
|00004d60| 6f 72 74 20 74 68 65 6d | 20 74 6f 20 61 20 75 73 |ort them| to a us|
|00004d70| 65 72 20 76 69 61 20 61 | 20 64 69 61 6c 6f 67 20 |er via a| dialog |
|00004d80| 62 6f 78 20 69 6e 20 61 | 20 63 6c 65 61 6e 20 61 |box in a| clean a|
|00004d90| 6e 64 20 67 72 61 63 65 | 66 75 6c 20 6d 61 6e 6e |nd grace|ful mann|
|00004da0| 65 72 2e 0d 54 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |er..The |followin|
|00004db0| 67 20 73 65 63 74 69 6f | 6e 20 6f 75 74 6c 69 6e |g sectio|n outlin|
|00004dc0| 65 73 20 73 6f 6d 65 20 | 67 65 6e 65 72 61 6c 20 |es some |general |
|00004dd0| 65 72 72 6f 72 2d 68 61 | 6e 64 6c 69 6e 67 20 67 |error-ha|ndling g|
|00004de0| 75 69 64 65 6c 69 6e 65 | 73 2e 0d a5 09 59 6f 75 |uideline|s....You|
|00004df0| 20 73 68 6f 75 6c 64 20 | 61 76 6f 69 64 20 63 61 | should |avoid ca|
|00004e00| 6c 6c 69 6e 67 20 50 72 | 45 72 72 6f 72 20 77 69 |lling Pr|Error wi|
|00004e10| 74 68 69 6e 20 79 6f 75 | 72 20 70 49 64 6c 65 20 |thin you|r pIdle |
|00004e20| 70 72 6f 63 65 64 75 72 | 65 3b 20 65 72 72 6f 72 |procedur|e; error|
|00004e30| 73 20 74 68 61 74 20 6f | 63 63 75 72 20 77 68 69 |s that o|ccur whi|
|00004e40| 6c 65 20 69 74 20 69 73 | 20 65 78 65 63 75 74 69 |le it is| executi|
|00004e50| 6e 67 20 61 72 65 20 75 | 73 75 61 6c 6c 79 20 74 |ng are u|sually t|
|00004e60| 65 6d 70 6f 72 61 72 79 | 20 61 6e 64 20 73 65 72 |emporary| and ser|
|00004e70| 76 65 20 6f 6e 6c 79 20 | 61 73 20 69 6e 74 65 72 |ve only |as inter|
|00004e80| 6e 61 6c 20 66 6c 61 67 | 73 20 66 6f 72 20 63 6f |nal flag|s for co|
|00004e90| 6d 6d 75 6e 69 63 61 74 | 69 6f 6e 20 77 69 74 68 |mmunicat|ion with|
|00004ea0| 69 6e 20 74 68 65 20 70 | 72 69 6e 74 65 72 20 64 |in the p|rinter d|
|00004eb0| 72 69 76 65 72 d1 74 68 | 65 79 20 61 72 65 20 6e |river.th|ey are n|
|00004ec0| 6f 74 20 69 6e 74 65 6e | 64 65 64 20 66 6f 72 20 |ot inten|ded for |
|00004ed0| 74 68 65 20 61 70 70 6c | 69 63 61 74 69 6f 6e 2e |the appl|ication.|
|00004ee0| 20 20 49 66 20 79 6f 75 | 20 61 62 73 6f 6c 75 74 | If you| absolut|
|00004ef0| 65 6c 79 20 6d 75 73 74 | 20 63 61 6c 6c 20 50 72 |ely must| call Pr|
|00004f00| 45 72 72 6f 72 20 77 69 | 74 68 69 6e 20 79 6f 75 |Error wi|thin you|
|00004f10| 72 20 69 64 6c 65 20 70 | 72 6f 63 65 64 75 72 65 |r idle p|rocedure|
|00004f20| 2c 20 61 6e 64 20 61 6e | 20 65 72 72 6f 72 20 6f |, and an| error o|
|00004f30| 63 63 75 72 73 2c 20 6e | 65 76 65 72 20 61 62 6f |ccurs, n|ever abo|
|00004f40| 72 74 20 70 72 69 6e 74 | 69 6e 67 20 77 69 74 68 |rt print|ing with|
|00004f50| 69 6e 20 74 68 65 20 69 | 64 6c 65 20 70 72 6f 63 |in the i|dle proc|
|00004f60| 65 64 75 72 65 20 69 74 | 73 65 6c 66 2e 20 20 57 |edure it|self. W|
|00004f70| 61 69 74 20 75 6e 74 69 | 6c 20 74 68 65 20 6c 61 |ait unti|l the la|
|00004f80| 73 74 20 63 61 6c 6c 65 | 64 20 70 72 69 6e 74 69 |st calle|d printi|
|00004f90| 6e 67 20 70 72 6f 63 65 | 64 75 72 65 20 72 65 74 |ng proce|dure ret|
|00004fa0| 75 72 6e 73 2c 20 74 68 | 65 6e 20 63 68 65 63 6b |urns, th|en check|
|00004fb0| 20 74 6f 20 73 65 65 20 | 69 66 20 74 68 65 20 65 | to see |if the e|
|00004fc0| 72 72 6f 72 20 73 74 69 | 6c 6c 20 72 65 6d 61 69 |rror sti|ll remai|
|00004fd0| 6e 73 2e 20 20 41 74 74 | 65 6d 70 74 69 6e 67 20 |ns. Att|empting |
|00004fe0| 74 6f 20 61 62 6f 72 74 | 20 70 72 69 6e 74 69 6e |to abort| printin|
|00004ff0| 67 20 77 69 74 68 69 6e | 20 61 6e 20 69 64 6c 65 |g within| an idle|
|00005000| 20 70 72 6f 63 65 64 75 | 72 65 20 69 73 20 61 20 | procedu|re is a |
|00005010| 67 75 61 72 61 6e 74 65 | 65 20 6f 66 20 63 65 72 |guarante|e of cer|
|00005020| 74 61 69 6e 20 64 65 61 | 74 68 2e 0d a5 09 55 70 |tain dea|th....Up|
|00005030| 6f 6e 20 64 65 74 65 63 | 74 69 6e 67 20 61 6e 20 |on detec|ting an |
|00005040| 65 72 72 6f 72 20 61 66 | 74 65 72 20 74 68 65 20 |error af|ter the |
|00005050| 63 6f 6d 70 6c 65 74 69 | 6f 6e 20 6f 66 20 61 20 |completi|on of a |
|00005060| 70 72 69 6e 74 69 6e 67 | 20 72 6f 75 74 69 6e 65 |printing| routine|
|00005070| 2c 20 73 74 6f 70 20 64 | 72 61 77 69 6e 67 20 61 |, stop d|rawing a|
|00005080| 74 20 74 68 61 74 20 70 | 6f 69 6e 74 2c 20 61 6e |t that p|oint, an|
|00005090| 64 20 70 72 6f 63 65 65 | 64 20 74 6f 20 74 68 65 |d procee|d to the|
|000050a0| 20 6e 65 78 74 20 70 72 | 6f 63 65 64 75 72 65 20 | next pr|ocedure |
|000050b0| 74 6f 20 63 6c 6f 73 65 | 20 61 6e 79 20 70 72 65 |to close| any pre|
|000050c0| 76 69 6f 75 73 6c 79 20 | 6d 61 64 65 20 6f 70 65 |viously |made ope|
|000050d0| 6e 20 63 61 6c 6c 73 2e | 20 20 46 6f 72 20 65 78 |n calls.| For ex|
|000050e0| 61 6d 70 6c 65 2c 20 69 | 66 20 79 6f 75 20 64 65 |ample, i|f you de|
|000050f0| 74 65 63 74 20 61 6e 20 | 65 72 72 6f 72 20 61 66 |tect an |error af|
|00005100| 74 65 72 20 63 61 6c 6c | 69 6e 67 20 50 72 4f 70 |ter call|ing PrOp|
|00005110| 65 6e 44 6f 63 2c 20 73 | 6b 69 70 20 74 6f 20 74 |enDoc, s|kip to t|
|00005120| 68 65 20 6e 65 78 74 20 | 50 72 43 6c 6f 73 65 44 |he next |PrCloseD|
|00005130| 6f 63 2e 20 20 4f 72 2c | 20 69 66 20 79 6f 75 20 |oc. Or,| if you |
|00005140| 67 65 74 20 61 6e 20 65 | 72 72 6f 72 20 61 66 74 |get an e|rror aft|
|00005150| 65 72 20 63 61 6c 6c 69 | 6e 67 20 50 72 4f 70 65 |er calli|ng PrOpe|
|00005160| 6e 50 61 67 65 2c 20 73 | 6b 69 70 20 74 6f 20 74 |nPage, s|kip to t|
|00005170| 68 65 20 6e 65 78 74 20 | 50 72 43 6c 6f 73 65 50 |he next |PrCloseP|
|00005180| 61 67 65 20 61 6e 64 20 | 50 72 43 6c 6f 73 65 44 |age and |PrCloseD|
|00005190| 6f 63 2e 20 20 52 65 6d | 65 6d 62 65 72 20 74 68 |oc. Rem|ember th|
|000051a0| 61 74 20 69 66 20 79 6f | 75 20 68 61 76 65 20 63 |at if yo|u have c|
|000051b0| 61 6c 6c 65 64 20 50 72 | 4f 70 65 6e 2c 20 74 68 |alled Pr|Open, th|
|000051c0| 65 6e 20 79 6f 75 20 6d | 75 73 74 20 63 61 6c 6c |en you m|ust call|
|000051d0| 20 74 68 65 20 63 6f 72 | 72 65 73 70 6f 6e 64 69 | the cor|respondi|
|000051e0| 6e 67 20 50 72 43 6c 6f | 73 65 20 74 6f 20 65 6e |ng PrClo|se to en|
|000051f0| 73 75 72 65 20 74 68 61 | 74 20 70 72 69 6e 74 69 |sure tha|t printi|
|00005200| 6e 67 20 63 6c 6f 73 65 | 73 20 70 72 6f 70 65 72 |ng close|s proper|
|00005210| 6c 79 20 61 6e 64 20 61 | 6c 6c 20 74 65 6d 70 6f |ly and a|ll tempo|
|00005220| 72 61 72 79 20 6d 65 6d | 6f 72 79 20 61 6c 6c 6f |rary mem|ory allo|
|00005230| 63 61 74 69 6f 6e 73 20 | 61 72 65 20 72 65 6c 65 |cations |are rele|
|00005240| 61 73 65 64 20 61 6e 64 | 20 72 65 74 75 72 6e 65 |ased and| returne|
|00005250| 64 20 74 6f 20 74 68 65 | 20 68 65 61 70 2e 0d a5 |d to the| heap...|
|00005260| 09 44 6f 20 6e 6f 74 20 | 64 69 73 70 6c 61 79 20 |.Do not |display |
|00005270| 61 6e 79 20 61 6c 65 72 | 74 20 6f 72 20 64 69 61 |any aler|t or dia|
|00005280| 6c 6f 67 20 62 6f 78 65 | 73 20 74 6f 20 72 65 70 |log boxe|s to rep|
|00005290| 6f 72 74 20 61 6e 20 65 | 72 72 6f 72 20 75 6e 74 |ort an e|rror unt|
|000052a0| 69 6c 20 74 68 65 20 65 | 6e 64 20 6f 66 20 74 68 |il the e|nd of th|
|000052b0| 65 20 70 72 69 6e 74 69 | 6e 67 20 6c 6f 6f 70 2e |e printi|ng loop.|
|000052c0| 20 20 4f 6e 63 65 20 61 | 74 20 74 68 65 20 65 6e | Once a|t the en|
|000052d0| 64 2c 20 63 68 65 63 6b | 20 66 6f 72 20 74 68 65 |d, check| for the|
|000052e0| 20 65 72 72 6f 72 20 61 | 67 61 69 6e 3b 20 69 66 | error a|gain; if|
|000052f0| 20 74 68 65 72 65 20 69 | 73 20 6e 6f 20 65 72 72 | there i|s no err|
|00005300| 6f 72 20 61 73 73 75 6d | 65 20 74 68 61 74 20 70 |or assum|e that p|
|00005310| 72 69 6e 74 69 6e 67 20 | 63 6f 6d 70 6c 65 74 65 |rinting |complete|
|00005320| 64 20 6e 6f 72 6d 61 6c | 6c 79 2e 20 20 49 66 20 |d normal|ly. If |
|00005330| 74 68 65 20 65 72 72 6f | 72 20 69 73 20 73 74 69 |the erro|r is sti|
|00005340| 6c 6c 20 70 72 65 73 65 | 6e 74 2c 20 74 68 65 6e |ll prese|nt, then|
|00005350| 20 79 6f 75 20 63 61 6e | 20 61 6c 65 72 74 20 74 | you can| alert t|
|00005360| 68 65 20 75 73 65 72 2e | 0d 09 54 68 69 73 20 74 |he user.|..This t|
|00005370| 65 63 68 6e 69 71 75 65 | 20 69 73 20 69 6d 70 6f |echnique| is impo|
|00005380| 72 74 61 6e 74 20 66 6f | 72 20 74 77 6f 20 72 65 |rtant fo|r two re|
|00005390| 61 73 6f 6e 73 2e 20 20 | 46 69 72 73 74 2c 20 69 |asons. |First, i|
|000053a0| 66 20 79 6f 75 20 64 69 | 73 70 6c 61 79 20 61 20 |f you di|splay a |
|000053b0| 64 69 61 6c 6f 67 20 62 | 6f 78 20 69 6e 20 74 68 |dialog b|ox in th|
|000053c0| 65 20 6d 69 64 64 6c 65 | 20 6f 66 20 74 68 65 20 |e middle| of the |
|000053d0| 70 72 69 6e 74 69 6e 67 | 20 6c 6f 6f 70 2c 20 69 |printing| loop, i|
|000053e0| 74 20 63 6f 75 6c 64 20 | 63 61 75 73 65 20 65 72 |t could |cause er|
|000053f0| 72 6f 72 73 20 74 68 61 | 74 20 63 61 6e 20 74 65 |rors tha|t can te|
|00005400| 72 6d 69 6e 61 74 65 20 | 61 6e 20 6f 74 68 65 72 |rminate |an other|
|00005410| 77 69 73 65 20 6e 6f 72 | 6d 61 6c 20 6a 6f 62 2e |wise nor|mal job.|
|00005420| 20 20 46 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 69 | For ex|ample, i|
|00005430| 66 20 74 68 65 20 70 72 | 69 6e 74 65 72 20 69 73 |f the pr|inter is|
|00005440| 20 61 6e 20 41 70 70 6c | 65 54 61 6c 6b 20 70 72 | an Appl|eTalk pr|
|00005450| 69 6e 74 65 72 2c 20 74 | 68 65 20 63 6f 6e 6e 65 |inter, t|he conne|
|00005460| 63 74 69 6f 6e 20 63 61 | 6e 20 62 65 20 74 65 72 |ction ca|n be ter|
|00005470| 6d 69 6e 61 74 65 64 20 | 61 62 6e 6f 72 6d 61 6c |minated |abnormal|
|00005480| 6c 79 20 73 69 6e 63 65 | 20 74 68 65 20 64 72 69 |ly since| the dri|
|00005490| 76 65 72 20 77 6f 75 6c | 64 20 62 65 20 75 6e 61 |ver woul|d be una|
|000054a0| 62 6c 65 20 74 6f 20 72 | 65 73 70 6f 6e 64 20 74 |ble to r|espond t|
|000054b0| 6f 20 41 70 70 6c 65 54 | 61 6c 6b 20 72 65 71 75 |o AppleT|alk requ|
|000054c0| 65 73 74 73 20 72 65 63 | 65 69 76 65 64 20 66 72 |ests rec|eived fr|
|000054d0| 6f 6d 20 74 68 65 20 70 | 72 69 6e 74 65 72 20 77 |om the p|rinter w|
|000054e0| 68 69 6c 65 20 74 68 65 | 20 64 69 61 6c 6f 67 20 |hile the| dialog |
|000054f0| 62 6f 78 20 77 61 73 20 | 77 61 69 74 69 6e 67 20 |box was |waiting |
|00005500| 66 6f 72 20 69 6e 70 75 | 74 20 66 72 6f 6d 20 74 |for inpu|t from t|
|00005510| 68 65 20 75 73 65 72 2e | 20 20 49 66 20 74 68 65 |he user.| If the|
|00005520| 20 70 72 69 6e 74 65 72 | 20 64 6f 65 73 20 6e 6f | printer| does no|
|00005530| 74 20 68 65 61 72 20 66 | 72 6f 6d 20 74 68 65 20 |t hear f|rom the |
|00005540| 4d 61 63 69 6e 74 6f 73 | 68 20 77 69 74 68 20 61 |Macintos|h with a|
|00005550| 20 73 68 6f 72 74 20 70 | 65 72 69 6f 64 20 6f 66 | short p|eriod of|
|00005560| 20 74 69 6d 65 20 28 65 | 2e 67 2e 2c 20 33 30 20 | time (e|.g., 30 |
|00005570| 73 65 63 6f 6e 64 73 29 | 2c 20 69 74 20 74 69 6d |seconds)|, it tim|
|00005580| 65 73 20 6f 75 74 2c 20 | 61 73 73 75 6d 69 6e 67 |es out, |assuming|
|00005590| 20 74 68 61 74 20 74 68 | 65 20 4d 61 63 69 6e 74 | that th|e Macint|
|000055a0| 6f 73 68 20 69 73 20 6e | 6f 20 6c 6f 6e 67 65 72 |osh is n|o longer|
|000055b0| 20 74 68 65 72 65 2c 20 | 77 68 69 63 68 20 72 65 | there, |which re|
|000055c0| 73 75 6c 74 73 20 69 6e | 20 61 20 70 72 65 6d 61 |sults in| a prema|
|000055d0| 74 75 72 65 6c 79 20 62 | 72 6f 6b 65 6e 20 63 6f |turely b|roken co|
|000055e0| 6e 6e 65 63 74 69 6f 6e | 20 63 61 75 73 69 6e 67 |nnection| causing|
|000055f0| 20 61 6e 6f 74 68 65 72 | 20 65 72 72 6f 72 20 74 | another| error t|
|00005600| 6f 20 77 68 69 63 68 20 | 74 68 65 20 61 70 70 6c |o which |the appl|
|00005610| 69 63 61 74 69 6f 6e 20 | 6d 75 73 74 20 72 65 73 |ication |must res|
|00005620| 70 6f 6e 64 2e 0d 09 49 | 6e 20 61 64 64 69 74 69 |pond...I|n additi|
|00005630| 6f 6e 2c 20 74 68 65 20 | 64 72 69 76 65 72 20 6d |on, the |driver m|
|00005640| 61 79 20 68 61 76 65 20 | 61 6c 72 65 61 64 79 20 |ay have |already |
|00005650| 64 69 73 70 6c 61 79 65 | 64 20 69 74 73 20 6f 77 |displaye|d its ow|
|00005660| 6e 20 64 69 61 6c 6f 67 | 20 62 6f 78 20 69 6e 20 |n dialog| box in |
|00005670| 72 65 73 70 6f 6e 73 65 | 20 74 6f 20 61 6e 20 65 |response| to an e|
|00005680| 72 72 6f 72 2e 20 20 49 | 6e 20 74 68 69 73 20 69 |rror. I|n this i|
|00005690| 6e 73 74 61 6e 63 65 2c | 20 74 68 65 20 64 72 69 |nstance,| the dri|
|000056a0| 76 65 72 20 70 6f 73 74 | 73 20 61 6e 20 65 72 72 |ver post|s an err|
|000056b0| 6f 72 20 74 6f 20 6c 65 | 74 20 74 68 65 20 61 70 |or to le|t the ap|
|000056c0| 70 6c 69 63 61 74 69 6f | 6e 20 6b 6e 6f 77 20 74 |plicatio|n know t|
|000056d0| 68 61 74 20 73 6f 6d 65 | 74 68 69 6e 67 20 77 65 |hat some|thing we|
|000056e0| 6e 74 20 77 72 6f 6e 67 | 20 61 6e 64 20 69 74 20 |nt wrong| and it |
|000056f0| 73 68 6f 75 6c 64 20 61 | 62 6f 72 74 20 70 72 69 |should a|bort pri|
|00005700| 6e 74 69 6e 67 2e 20 20 | 46 6f 72 20 65 78 61 6d |nting. |For exam|
|00005710| 70 6c 65 2c 20 77 68 65 | 6e 20 74 68 65 20 4c 61 |ple, whe|n the La|
|00005720| 73 65 72 57 72 69 74 65 | 72 20 64 72 69 76 65 72 |serWrite|r driver|
|00005730| 20 64 65 74 65 63 74 73 | 20 74 68 61 74 20 74 68 | detects| that th|
|00005740| 65 20 4c 61 73 65 72 20 | 50 72 65 70 20 76 65 72 |e Laser |Prep ver|
|00005750| 73 69 6f 6e 20 77 68 69 | 63 68 20 68 61 73 20 62 |sion whi|ch has b|
|00005760| 65 65 6e 20 64 6f 77 6e | 6c 6f 61 64 65 64 20 74 |een down|loaded t|
|00005770| 6f 20 74 68 65 20 4c 61 | 73 65 72 57 72 69 74 65 |o the La|serWrite|
|00005780| 72 20 69 73 20 64 69 66 | 66 65 72 65 6e 74 20 74 |r is dif|ferent t|
|00005790| 68 61 6e 20 74 68 61 74 | 20 77 69 74 68 20 77 68 |han that| with wh|
|000057a0| 69 63 68 20 74 68 65 20 | 75 73 65 72 20 69 73 20 |ich the |user is |
|000057b0| 74 72 79 69 6e 67 20 74 | 6f 20 70 72 69 6e 74 2c |trying t|o print,|
|000057c0| 20 69 74 20 64 69 73 70 | 6c 61 79 73 20 74 68 65 | it disp|lays the|
|000057d0| 20 61 70 70 72 6f 70 72 | 69 61 74 65 20 64 69 61 | appropr|iate dia|
|000057e0| 6c 6f 67 20 62 6f 78 20 | 69 6e 66 6f 72 6d 69 6e |log box |informin|
|000057f0| 67 20 74 68 65 20 75 73 | 65 72 20 6f 66 20 74 68 |g the us|er of th|
|00005800| 65 20 73 69 74 75 61 74 | 69 6f 6e 20 61 6e 64 20 |e situat|ion and |
|00005810| 67 69 76 69 6e 67 20 68 | 69 6d 20 74 68 65 20 6f |giving h|im the o|
|00005820| 70 74 69 6f 6e 20 6f 66 | 20 72 65 69 6e 69 74 69 |ption of| reiniti|
|00005830| 61 6c 69 7a 69 6e 67 20 | 74 68 65 20 70 72 69 6e |alizing |the prin|
|00005840| 74 65 72 2e 20 20 49 66 | 20 74 68 65 20 75 73 65 |ter. If| the use|
|00005850| 72 20 63 68 6f 6f 73 65 | 73 20 74 6f 20 63 61 6e |r choose|s to can|
|00005860| 63 65 6c 20 70 72 69 6e | 74 69 6e 67 2c 20 74 68 |cel prin|ting, th|
|00005870| 65 20 64 72 69 76 65 72 | 20 70 6f 73 74 73 20 61 |e driver| posts a|
|00005880| 6e 20 65 72 72 6f 72 20 | 74 6f 20 6c 65 74 20 74 |n error |to let t|
|00005890| 68 65 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 6b |he appli|cation k|
|000058a0| 6e 6f 77 20 74 68 61 74 | 20 69 74 20 6e 65 65 64 |now that| it need|
|000058b0| 73 20 74 6f 20 61 62 6f | 72 74 2c 20 62 75 74 20 |s to abo|rt, but |
|000058c0| 73 69 6e 63 65 20 74 68 | 65 20 64 72 69 76 65 72 |since th|e driver|
|000058d0| 20 68 61 73 20 61 6c 72 | 65 61 64 79 20 74 61 6b | has alr|eady tak|
|000058e0| 65 6e 20 63 61 72 65 20 | 6f 66 20 74 68 65 20 65 |en care |of the e|
|000058f0| 72 72 6f 72 20 62 79 20 | 64 69 73 70 6c 61 79 69 |rror by |displayi|
|00005900| 6e 67 20 61 20 64 69 61 | 6c 6f 67 20 62 6f 78 2c |ng a dia|log box,|
|00005910| 20 74 68 65 20 65 72 72 | 6f 72 20 69 73 20 72 65 | the err|or is re|
|00005920| 73 65 74 20 74 6f 20 7a | 65 72 6f 20 62 65 66 6f |set to z|ero befo|
|00005930| 72 65 20 74 68 65 20 70 | 72 69 6e 74 69 6e 67 20 |re the p|rinting |
|00005940| 6c 6f 6f 70 20 69 73 20 | 63 6f 6d 70 6c 65 74 65 |loop is |complete|
|00005950| 2e 20 20 54 68 65 20 61 | 70 70 6c 69 63 61 74 69 |. The a|pplicati|
|00005960| 6f 6e 20 73 68 6f 75 6c | 64 20 63 68 65 63 6b 20 |on shoul|d check |
|00005970| 66 6f 72 20 74 68 65 20 | 65 72 72 6f 72 20 61 67 |for the |error ag|
|00005980| 61 69 6e 20 61 74 20 74 | 68 65 20 65 6e 64 20 6f |ain at t|he end o|
|00005990| 66 20 74 68 65 20 70 72 | 69 6e 74 69 6e 67 20 6c |f the pr|inting l|
|000059a0| 6f 6f 70 2c 20 61 6e 64 | 20 69 66 20 69 74 20 73 |oop, and| if it s|
|000059b0| 74 69 6c 6c 20 69 6e 64 | 69 63 61 74 65 73 20 61 |till ind|icates a|
|000059c0| 6e 20 65 72 72 6f 72 2c | 20 74 68 65 20 61 70 70 |n error,| the app|
|000059d0| 6c 69 63 61 74 69 6f 6e | 20 63 61 6e 20 74 68 65 |lication| can the|
|000059e0| 6e 20 64 69 73 70 6c 61 | 79 20 74 68 65 20 61 70 |n displa|y the ap|
|000059f0| 70 72 6f 70 72 69 61 74 | 65 20 64 69 61 6c 6f 67 |propriat|e dialog|
|00005a00| 20 62 6f 78 2e 0d a5 09 | 49 66 20 75 73 69 6e 67 | box....|If using|
|00005a10| 20 50 72 47 65 6e 65 72 | 61 6c 2c 20 62 65 20 70 | PrGener|al, be p|
|00005a20| 72 65 70 61 72 65 64 20 | 74 6f 20 72 65 63 65 69 |repared |to recei|
|00005a30| 76 65 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |ve the f|ollowing|
|00005a40| 20 65 72 72 6f 72 73 3a | 20 20 4e 6f 53 75 63 68 | errors:| NoSuch|
|00005a50| 52 73 6c 2c 20 4f 70 4e | 6f 74 49 6d 70 6c 2c 20 |Rsl, OpN|otImpl, |
|00005a60| 61 6e 64 20 72 65 73 4e | 6f 74 46 6f 75 6e 64 2e |and resN|otFound.|
|00005a70| 20 20 49 6e 20 61 6c 6c | 20 74 68 72 65 65 20 63 | In all| three c|
|00005a80| 61 73 65 73 2c 20 74 68 | 65 20 61 70 70 6c 69 63 |ases, th|e applic|
|00005a90| 61 74 69 6f 6e 20 73 68 | 6f 75 6c 64 20 62 65 20 |ation sh|ould be |
|00005aa0| 70 72 65 70 61 72 65 64 | 20 74 6f 20 63 6f 6e 74 |prepared| to cont|
|00005ab0| 69 6e 75 65 20 74 6f 20 | 70 72 69 6e 74 20 77 69 |inue to |print wi|
|00005ac0| 74 68 6f 75 74 20 75 73 | 69 6e 67 20 74 68 65 20 |thout us|ing the |
|00005ad0| 66 65 61 74 75 72 65 73 | 20 6f 66 20 74 68 61 74 |features| of that|
|00005ae0| 20 70 61 72 74 69 63 75 | 6c 61 72 20 6f 70 63 6f | particu|lar opco|
|00005af0| 64 65 2e 0d 09 48 6f 77 | 65 76 65 72 2c 20 69 6e |de...How|ever, in|
|00005b00| 20 74 68 65 20 63 61 73 | 65 20 6f 66 20 74 68 65 | the cas|e of the|
|00005b10| 20 72 65 73 4e 6f 74 46 | 6f 75 6e 64 20 65 72 72 | resNotF|ound err|
|00005b20| 6f 72 2c 20 69 74 20 6d | 65 61 6e 73 20 74 68 65 |or, it m|eans the|
|00005b30| 20 63 75 72 72 65 6e 74 | 20 70 72 69 6e 74 65 72 | current| printer|
|00005b40| 20 64 72 69 76 65 72 20 | 64 6f 65 73 20 6e 6f 74 | driver |does not|
|00005b50| 20 73 75 70 70 6f 72 74 | 20 50 72 47 65 6e 65 72 | support| PrGener|
|00005b60| 61 6c 2e 20 20 54 68 69 | 73 20 6c 61 63 6b 20 6f |al. Thi|s lack o|
|00005b70| 66 20 73 75 70 70 6f 72 | 74 20 73 68 6f 75 6c 64 |f suppor|t should|
|00005b80| 20 6e 6f 74 20 62 65 20 | 61 20 70 72 6f 62 6c 65 | not be |a proble|
|00005b90| 6d 20 66 6f 72 20 61 6e | 20 61 70 70 6c 69 63 61 |m for an| applica|
|00005ba0| 74 69 6f 6e 2c 20 62 75 | 74 20 69 74 20 6e 65 65 |tion, bu|t it nee|
|00005bb0| 64 73 20 74 6f 20 62 65 | 20 70 72 65 70 61 72 65 |ds to be| prepare|
|00005bc0| 64 20 74 6f 20 64 65 61 | 6c 20 77 69 74 68 20 74 |d to dea|l with t|
|00005bd0| 68 69 73 20 65 72 72 6f | 72 2e 20 20 49 66 20 79 |his erro|r. If y|
|00005be0| 6f 75 20 72 65 63 65 69 | 76 65 20 61 20 72 65 73 |ou recei|ve a res|
|00005bf0| 4e 6f 74 46 6f 75 6e 64 | 20 65 72 72 6f 72 20 66 |NotFound| error f|
|00005c00| 72 6f 6d 20 50 72 45 72 | 72 6f 72 2c 20 63 6c 65 |rom PrEr|ror, cle|
|00005c10| 61 72 20 74 68 65 20 65 | 72 72 6f 72 20 77 69 74 |ar the e|rror wit|
|00005c20| 68 20 61 20 63 61 6c 6c | 20 74 6f 20 50 72 53 65 |h a call| to PrSe|
|00005c30| 74 45 72 72 6f 72 28 30 | 29 3b 20 6f 74 68 65 72 |tError(0|); other|
|00005c40| 77 69 73 65 2c 20 50 72 | 45 72 72 6f 72 20 6d 69 |wise, Pr|Error mi|
|00005c50| 67 68 74 20 73 74 69 6c | 6c 20 63 6f 6e 74 61 69 |ght stil|l contai|
|00005c60| 6e 20 74 68 69 73 20 65 | 72 72 6f 72 20 74 68 65 |n this e|rror the|
|00005c70| 20 6e 65 78 74 20 74 69 | 6d 65 20 79 6f 75 20 63 | next ti|me you c|
|00005c80| 68 65 63 6b 20 69 74 2c | 20 77 68 69 63 68 20 77 |heck it,| which w|
|00005c90| 6f 75 6c 64 20 70 72 65 | 76 65 6e 74 20 79 6f 75 |ould pre|vent you|
|00005ca0| 72 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 66 72 |r applic|ation fr|
|00005cb0| 6f 6d 20 70 72 69 6e 74 | 69 6e 67 2e 0d 43 61 6e |om print|ing..Can|
|00005cc0| 63 65 6c 69 6e 67 20 6f | 72 20 50 61 75 73 69 6e |celing o|r Pausin|
|00005cd0| 67 20 74 68 65 20 50 72 | 69 6e 74 69 6e 67 20 50 |g the Pr|inting P|
|00005ce0| 72 6f 63 65 73 73 0d 49 | 66 20 79 6f 75 20 69 6e |rocess.I|f you in|
|00005cf0| 73 74 61 6c 6c 20 61 20 | 70 72 6f 63 65 64 75 72 |stall a |procedur|
|00005d00| 65 20 66 6f 72 20 68 61 | 6e 64 6c 69 6e 67 20 72 |e for ha|ndling r|
|00005d10| 65 71 75 65 73 74 73 20 | 74 6f 20 63 61 6e 63 65 |equests |to cance|
|00005d20| 6c 20 70 72 69 6e 74 69 | 6e 67 2c 20 77 69 74 68 |l printi|ng, with|
|00005d30| 20 61 6e 20 6f 70 74 69 | 6f 6e 20 74 6f 20 70 61 | an opti|on to pa|
|00005d40| 75 73 65 20 74 68 65 20 | 70 72 69 6e 74 69 6e 67 |use the |printing|
|00005d50| 20 70 72 6f 63 65 73 73 | 2c 20 62 65 77 61 72 65 | process|, beware|
|00005d60| 20 6f 66 20 74 69 6d 65 | 6f 75 74 20 70 72 6f 62 | of time|out prob|
|00005d70| 6c 65 6d 73 20 77 68 65 | 6e 20 70 72 69 6e 74 69 |lems whe|n printi|
|00005d80| 6e 67 20 74 6f 20 74 68 | 65 20 4c 61 73 65 72 57 |ng to th|e LaserW|
|00005d90| 72 69 74 65 72 2e 20 20 | 43 6f 6d 6d 75 6e 69 63 |riter. |Communic|
|00005da0| 61 74 69 6f 6e 20 62 65 | 74 77 65 65 6e 20 74 68 |ation be|tween th|
|00005db0| 65 20 4d 61 63 69 6e 74 | 6f 73 68 20 61 6e 64 20 |e Macint|osh and |
|00005dc0| 74 68 65 20 4c 61 73 65 | 72 57 72 69 74 65 72 20 |the Lase|rWriter |
|00005dd0| 6d 75 73 74 20 62 65 20 | 6d 61 69 6e 74 61 69 6e |must be |maintain|
|00005de0| 65 64 20 74 6f 20 70 72 | 65 76 65 6e 74 20 61 20 |ed to pr|event a |
|00005df0| 6a 6f 62 20 6f 72 20 61 | 20 77 61 69 74 20 74 69 |job or a| wait ti|
|00005e00| 6d 65 6f 75 74 2e 20 20 | 49 66 20 74 68 65 72 65 |meout. |If there|
|00005e10| 20 69 73 20 6e 6f 20 63 | 6f 6d 6d 75 6e 69 63 61 | is no c|ommunica|
|00005e20| 74 69 6f 6e 20 66 6f 72 | 20 61 20 70 65 72 69 6f |tion for| a perio|
|00005e30| 64 20 6f 66 20 74 69 6d | 65 20 28 6f 76 65 72 20 |d of tim|e (over |
|00005e40| 74 77 6f 20 6d 69 6e 75 | 74 65 73 29 2c 20 74 68 |two minu|tes), th|
|00005e50| 65 20 70 72 69 6e 74 65 | 72 20 74 69 6d 65 73 20 |e printe|r times |
|00005e60| 6f 75 74 20 61 6e 64 20 | 74 68 65 20 70 72 69 6e |out and |the prin|
|00005e70| 74 20 6a 6f 62 20 74 65 | 72 6d 69 6e 61 74 65 73 |t job te|rminates|
|00005e80| 20 64 75 65 20 74 6f 20 | 61 20 77 61 69 74 20 20 | due to |a wait |
|00005e90| 74 69 6d 65 6f 75 74 2e | 20 20 4f 72 2c 20 69 66 |timeout.| Or, if|
|00005ea0| 20 74 68 65 20 70 72 69 | 6e 74 20 6a 6f 62 20 72 | the pri|nt job r|
|00005eb0| 65 71 75 69 72 65 73 20 | 6d 6f 72 65 20 74 68 61 |equires |more tha|
|00005ec0| 6e 20 74 68 72 65 65 20 | 6d 69 6e 75 74 65 73 20 |n three |minutes |
|00005ed0| 74 6f 20 70 72 69 6e 74 | 2c 20 74 68 65 20 70 72 |to print|, the pr|
|00005ee0| 69 6e 74 20 6a 6f 62 20 | 74 65 72 6d 69 6e 61 74 |int job |terminat|
|00005ef0| 65 73 20 64 75 65 20 74 | 6f 20 61 20 6a 6f 62 20 |es due t|o a job |
|00005f00| 74 69 6d 65 6f 75 74 2e | 20 20 53 69 6e 63 65 2c |timeout.| Since,|
|00005f10| 20 74 68 65 72 65 20 69 | 73 20 6e 6f 20 67 6f 6f | there i|s no goo|
|00005f20| 64 20 6d 65 74 68 6f 64 | 20 74 6f 20 64 65 74 65 |d method| to dete|
|00005f30| 72 6d 69 6e 65 20 74 6f | 20 77 68 61 74 20 74 79 |rmine to| what ty|
|00005f40| 70 65 20 6f 66 20 70 72 | 69 6e 74 65 72 20 61 6e |pe of pr|inter an|
|00005f50| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 69 73 20 | applica|tion is |
|00005f60| 70 72 69 6e 74 69 6e 67 | 2c 20 69 74 20 69 73 20 |printing|, it is |
|00005f70| 70 72 6f 62 61 62 6c 79 | 20 61 20 67 6f 6f 64 20 |probably| a good |
|00005f80| 69 64 65 61 20 74 6f 20 | 64 6f 63 75 6d 65 6e 74 |idea to |document|
|00005f90| 20 74 68 65 20 70 6f 73 | 73 69 62 69 6c 69 74 79 | the pos|sibility|
|00005fa0| 20 6f 66 20 61 20 4c 61 | 73 65 72 57 72 69 74 65 | of a La|serWrite|
|00005fb0| 72 20 74 69 6d 69 6e 67 | 20 6f 75 74 20 66 6f 72 |r timing| out for|
|00005fc0| 20 61 20 75 73 65 72 20 | 77 68 6f 20 63 68 6f 6f | a user |who choo|
|00005fd0| 73 65 73 20 74 6f 20 73 | 65 6c 65 63 74 20 d2 70 |ses to s|elect .p|
|00005fe0| 61 75 73 65 d3 20 66 6f | 72 20 6f 76 65 72 20 74 |ause. fo|r over t|
|00005ff0| 77 6f 20 6d 69 6e 75 74 | 65 73 2e 0d 45 72 72 6f |wo minut|es..Erro|
|00006000| 72 20 4d 65 73 73 61 67 | 65 73 20 43 72 65 61 74 |r Messag|es Creat|
|00006010| 65 64 20 49 6e 20 50 72 | 69 6e 74 20 4c 61 6e 64 |ed In Pr|int Land|
|00006020| c9 0d 54 68 65 20 50 72 | 69 6e 74 69 6e 67 20 4d |..The Pr|inting M|
|00006030| 61 6e 61 67 65 72 20 72 | 65 70 6f 72 74 73 20 74 |anager r|eports t|
|00006040| 68 65 20 65 72 72 6f 72 | 20 6d 65 73 73 61 67 65 |he error| message|
|00006050| 73 20 63 6f 76 65 72 65 | 64 20 69 6e 20 74 68 69 |s covere|d in thi|
|00006060| 73 20 73 65 63 74 69 6f | 6e 2e 20 20 49 66 20 61 |s sectio|n. If a|
|00006070| 6e 20 65 72 72 6f 72 20 | 74 68 61 74 20 64 6f 65 |n error |that doe|
|00006080| 73 20 6e 6f 74 20 62 65 | 6c 6f 6e 67 20 74 6f 20 |s not be|long to |
|00006090| 74 68 65 20 50 72 69 6e | 74 69 6e 67 20 4d 61 6e |the Prin|ting Man|
|000060a0| 61 67 65 72 20 6f 63 63 | 75 72 73 2c 20 74 68 65 |ager occ|urs, the|
|000060b0| 20 50 72 69 6e 74 69 6e | 67 20 4d 61 6e 61 67 65 | Printin|g Manage|
|000060c0| 72 20 70 75 74 73 20 69 | 74 20 69 6e 74 6f 20 6c |r puts i|t into l|
|000060d0| 6f 77 20 6d 65 6d 6f 72 | 79 2c 20 77 68 65 72 65 |ow memor|y, where|
|000060e0| 20 69 74 20 63 61 6e 20 | 62 65 20 72 65 74 72 69 | it can |be retri|
|000060f0| 65 76 65 64 20 77 69 74 | 68 20 61 20 63 61 6c 6c |eved wit|h a call|
|00006100| 20 74 6f 20 50 72 45 72 | 72 6f 72 2c 20 61 6e 64 | to PrEr|ror, and|
|00006110| 20 74 65 72 6d 69 6e 61 | 74 65 73 20 74 68 65 20 | termina|tes the |
|00006120| 70 72 69 6e 74 69 6e 67 | 20 6c 6f 6f 70 2c 20 69 |printing| loop, i|
|00006130| 66 20 6e 65 63 65 73 73 | 61 72 79 2e 20 20 41 73 |f necess|ary. As|
|00006140| 20 61 6c 72 65 61 64 79 | 20 64 6f 63 75 6d 65 6e | already| documen|
|00006150| 74 65 64 2c 20 69 66 20 | 79 6f 75 20 65 6e 63 6f |ted, if |you enco|
|00006160| 75 6e 74 65 72 20 61 6e | 20 65 72 72 6f 72 20 69 |unter an| error i|
|00006170| 6e 20 74 68 65 20 6d 69 | 64 64 6c 65 20 6f 66 20 |n the mi|ddle of |
|00006180| 61 20 70 72 69 6e 74 69 | 6e 67 20 6c 6f 6f 70 2c |a printi|ng loop,|
|00006190| 20 64 6f 20 6e 6f 74 20 | 6a 75 6d 70 20 6f 75 74 | do not |jump out|
|000061a0| 3b 20 66 61 6c 6c 20 74 | 68 72 6f 75 67 68 20 74 |; fall t|hrough t|
|000061b0| 68 65 20 6c 6f 6f 70 20 | 61 6e 64 20 6c 65 74 20 |he loop |and let |
|000061c0| 74 68 65 20 50 72 69 6e | 74 69 6e 67 20 4d 61 6e |the Prin|ting Man|
|000061d0| 61 67 65 72 20 74 65 72 | 6d 69 6e 61 74 65 20 70 |ager ter|minate p|
|000061e0| 72 6f 70 65 72 6c 79 2e | 0d 45 72 72 6f 72 20 43 |roperly.|.Error C|
|000061f0| 6f 64 65 09 43 6f 6e 73 | 74 61 6e 74 09 44 65 73 |ode.Cons|tant.Des|
|00006200| 63 72 69 70 74 69 6f 6e | 0d 09 30 09 6e 6f 45 72 |cription|..0.noEr|
|00006210| 72 09 4e 6f 20 65 72 72 | 6f 72 0d 09 31 32 38 09 |r.No err|or..128.|
|00006220| 69 50 72 41 62 6f 72 74 | 09 41 62 6f 72 74 20 74 |iPrAbort|.Abort t|
|00006230| 68 65 20 70 72 69 6e 74 | 69 6e 67 20 70 72 6f 63 |he print|ing proc|
|00006240| 65 73 73 20 0d 09 09 09 | 28 43 6f 6d 6d 61 6e 64 |ess ....|(Command|
|00006250| 2d 70 65 72 69 6f 64 29 | 0d 09 2d 31 09 69 50 72 |-period)|..-1.iPr|
|00006260| 53 61 76 65 50 46 69 6c | 09 50 72 6f 62 6c 65 6d |SavePFil|.Problem|
|00006270| 20 73 61 76 69 6e 67 20 | 70 72 69 6e 74 20 66 69 | saving |print fi|
|00006280| 6c 65 0d 09 2d 31 37 09 | 63 6f 6e 74 72 6f 6c 45 |le..-17.|controlE|
|00006290| 72 72 09 55 6e 69 6d 70 | 6c 65 6d 65 6e 74 65 64 |rr.Unimp|lemented|
|000062a0| 20 43 6f 6e 74 72 6f 6c | 20 63 61 6c 6c 0d 09 2d | Control| call..-|
|000062b0| 32 37 09 69 49 4f 41 62 | 6f 72 74 09 49 2f 4f 20 |27.iIOAb|ort.I/O |
|000062c0| 70 72 6f 62 6c 65 6d 73 | 0d 09 2d 31 30 38 09 69 |problems|..-108.i|
|000062d0| 4d 65 6d 46 75 6c 6c 45 | 72 72 09 4e 6f 74 20 65 |MemFullE|rr.Not e|
|000062e0| 6e 6f 75 67 68 20 68 65 | 61 70 20 73 70 61 63 65 |nough he|ap space|
|000062f0| 0d 54 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 65 |.The fol|lowing e|
|00006300| 72 72 6f 72 73 20 61 72 | 65 20 73 70 65 63 69 66 |rrors ar|e specif|
|00006310| 69 63 20 74 6f 20 74 68 | 65 20 4c 61 73 65 72 57 |ic to th|e LaserW|
|00006320| 72 69 74 65 72 20 66 61 | 6d 69 6c 79 3a 0d 09 2d |riter fa|mily:..-|
|00006330| 34 31 30 31 09 09 50 72 | 69 6e 74 65 72 20 6e 6f |4101..Pr|inter no|
|00006340| 74 20 66 6f 75 6e 64 20 | 6f 72 20 63 6c 6f 73 65 |t found |or close|
|00006350| 64 0d 09 2d 34 31 30 30 | 09 09 43 6f 6e 6e 65 63 |d..-4100|..Connec|
|00006360| 74 69 6f 6e 20 6a 75 73 | 74 20 63 6c 6f 73 65 64 |tion jus|t closed|
|00006370| 0d 09 2d 34 30 39 39 09 | 09 57 72 69 74 65 20 72 |..-4099.|.Write r|
|00006380| 65 71 75 65 73 74 20 74 | 6f 6f 20 62 69 67 0d 09 |equest t|oo big..|
|00006390| 2d 34 30 39 38 09 09 52 | 65 71 75 65 73 74 20 61 |-4098..R|equest a|
|000063a0| 6c 72 65 61 64 79 20 61 | 63 74 69 76 65 0d 09 2d |lready a|ctive..-|
|000063b0| 34 30 39 37 09 09 42 61 | 64 20 63 6f 6e 6e 65 63 |4097..Ba|d connec|
|000063c0| 74 69 6f 6e 20 72 65 66 | 6e 75 6d 0d 09 2d 34 30 |tion ref|num..-40|
|000063d0| 39 36 09 09 4e 6f 20 66 | 72 65 65 20 43 6f 6e 6e |96..No f|ree Conn|
|000063e0| 65 63 74 20 43 6f 6e 74 | 72 6f 6c 20 42 6c 6f 63 |ect Cont|rol Bloc|
|000063f0| 6b 73 20 28 43 43 42 73 | 29 20 61 76 61 69 6c 61 |ks (CCBs|) availa|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.